1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-09 15:16:51 +02:00

Release v5.0.0-beta3 (#33439)

This commit is contained in:
XhmikosR
2021-03-23 18:26:54 +02:00
committed by GitHub
parent 69b9d638f8
commit 220139a89f
110 changed files with 9395 additions and 9335 deletions

View File

@@ -1,5 +1,5 @@
/*!
* Bootstrap base-component.js v5.0.0-beta2 (https://getbootstrap.com/)
* Bootstrap base-component.js v5.0.0-beta3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -13,62 +13,48 @@
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
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);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta3): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var VERSION = '5.0.0-beta2';
const VERSION = '5.0.0-beta3';
class BaseComponent {
constructor(element) {
element = typeof element === 'string' ? document.querySelector(element) : element;
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
Data__default['default'].set(this._element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
dispose() {
Data__default['default'].remove(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;
}
}]);
static getInstance(element) {
return Data__default['default'].get(element, this.DATA_KEY);
}
return BaseComponent;
}();
static get VERSION() {
return VERSION;
}
}
return BaseComponent;