diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-03-23 19:26:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-23 19:26:54 +0300 |
commit | 220139a89ffc3864bbb6e1b35471667318eadc1f (patch) | |
tree | 01d0d8f3389a8062f52ead211c13f9ceb989ab58 /js/dist/base-component.js | |
parent | 69b9d638f814d152a24d312d0dc901866b4dc6a9 (diff) |
Release v5.0.0-beta3 (#33439)v5.0.0-beta3
Diffstat (limited to 'js/dist/base-component.js')
-rw-r--r-- | js/dist/base-component.js | 60 |
1 files changed, 23 insertions, 37 deletions
diff --git a/js/dist/base-component.js b/js/dist/base-component.js index 80605b5a1a..2b9a4eff2a 100644 --- a/js/dist/base-component.js +++ b/js/dist/base-component.js @@ -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; |