aboutsummaryrefslogtreecommitdiff
path: root/js/dist/base-component.js
diff options
context:
space:
mode:
authorPatrick H. Lauke <[email protected]>2021-05-04 12:46:06 +0100
committerGitHub <[email protected]>2021-05-04 12:46:06 +0100
commit8865a8ab1c7157ab81bf49afa62b75f36daee46d (patch)
tree97ef78f2ea8e07aab50014176d061fe3c1d49134 /js/dist/base-component.js
parent018ee6a3b50b958ddb49657086cd9168abf5a485 (diff)
parent7ea6578773cb1b7f5cfb8fb41321b3fa10349daf (diff)
downloadbootstrap-jo-docs-thanks-page.tar.xz
bootstrap-jo-docs-thanks-page.zip
Merge branch 'main' into jo-docs-thanks-pagejo-docs-thanks-page
Diffstat (limited to 'js/dist/base-component.js')
-rw-r--r--js/dist/base-component.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/js/dist/base-component.js b/js/dist/base-component.js
new file mode 100644
index 000000000..2b9a4eff2
--- /dev/null
+++ b/js/dist/base-component.js
@@ -0,0 +1,62 @@
+/*!
+ * 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)
+ */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data));
+}(this, (function (Data) { 'use strict';
+
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-beta3): base-component.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const VERSION = '5.0.0-beta3';
+
+ class BaseComponent {
+ constructor(element) {
+ element = typeof element === 'string' ? document.querySelector(element) : element;
+
+ if (!element) {
+ return;
+ }
+
+ this._element = element;
+ Data__default['default'].set(this._element, this.constructor.DATA_KEY, this);
+ }
+
+ dispose() {
+ Data__default['default'].remove(this._element, this.constructor.DATA_KEY);
+ this._element = null;
+ }
+ /** Static */
+
+
+ static getInstance(element) {
+ return Data__default['default'].get(element, this.DATA_KEY);
+ }
+
+ static get VERSION() {
+ return VERSION;
+ }
+
+ }
+
+ return BaseComponent;
+
+})));
+//# sourceMappingURL=base-component.js.map