bootstrap.js 152 KB
Newer Older
XhmikosR's avatar
Dist    
XhmikosR committed
5001
5002
      }
    };
XhmikosR's avatar
Dist    
XhmikosR committed
5003

XhmikosR's avatar
Dist    
XhmikosR committed
5004
5005
5006
    _proto.dispose = function dispose() {
      clearTimeout(this._timeout);
      this._timeout = null;
Mark Otto's avatar
dist    
Mark Otto committed
5007

XhmikosR's avatar
XhmikosR committed
5008
5009
      if (this._element.classList.contains(CLASS_NAME_SHOW$6)) {
        this._element.classList.remove(CLASS_NAME_SHOW$6);
XhmikosR's avatar
Dist    
XhmikosR committed
5010
      }
Jacob Thornton's avatar
Jacob Thornton committed
5011

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

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

XhmikosR's avatar
Dist    
XhmikosR committed
5025
5026
    _proto._setListeners = function _setListeners() {
      var _this3 = this;
Mark Otto's avatar
dist    
Mark Otto committed
5027

XhmikosR's avatar
XhmikosR committed
5028
      EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
XhmikosR's avatar
XhmikosR committed
5029
        return _this3.hide();
XhmikosR's avatar
Dist    
XhmikosR committed
5030
      });
Mark Otto's avatar
Mark Otto committed
5031
5032
    } // Static
    ;
Jacob Thornton's avatar
Jacob Thornton committed
5033

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

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

        if (!data) {
          data = new Toast(this, _config);
        }
Jacob Thornton's avatar
Jacob Thornton committed
5043

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

XhmikosR's avatar
Dist    
XhmikosR committed
5049
          data[config](this);
XhmikosR's avatar
Dist    
XhmikosR committed
5050
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5051
5052
      });
    };
Mark Otto's avatar
grunt    
Mark Otto committed
5053

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

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

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

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

5086
5087
  /* istanbul ignore if */

XhmikosR's avatar
XhmikosR committed
5088
5089
5090
5091
  if ($$b) {
    var JQUERY_NO_CONFLICT$a = $$b.fn[NAME$a];
    $$b.fn[NAME$a] = Toast.jQueryInterface;
    $$b.fn[NAME$a].Constructor = Toast;
Mark Otto's avatar
dist    
Mark Otto committed
5092

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

Mark Otto's avatar
dist    
Mark Otto committed
5099
5100
  /**
   * --------------------------------------------------------------------------
5101
   * Bootstrap (v5.0.0-alpha1): index.umd.js
Mark Otto's avatar
dist    
Mark Otto committed
5102
5103
5104
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
   */
XhmikosR's avatar
Dist.    
XhmikosR committed
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
  var index_umd = {
    Alert: Alert,
    Button: Button,
    Carousel: Carousel,
    Collapse: Collapse,
    Dropdown: Dropdown,
    Modal: Modal,
    Popover: Popover,
    ScrollSpy: ScrollSpy,
    Tab: Tab,
    Toast: Toast,
    Tooltip: Tooltip
  };
Mark Otto's avatar
dist    
Mark Otto committed
5118

XhmikosR's avatar
Dist.    
XhmikosR committed
5119
  return index_umd;
Mark Otto's avatar
dist    
Mark Otto committed
5120

XhmikosR's avatar
XhmikosR committed
5121
})));
Mark Otto's avatar
dist    
Mark Otto committed
5122
//# sourceMappingURL=bootstrap.js.map
For faster browsing, not all history is shown. View entire blame