]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Move `VERSION` to BaseComponent (#32254)
authorRohit Sharma <rohit2sharma95@gmail.com>
Wed, 25 Nov 2020 07:13:33 +0000 (12:43 +0530)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 29 Nov 2020 18:58:26 +0000 (20:58 +0200)
12 files changed:
js/src/alert.js
js/src/base-component.js
js/src/button.js
js/src/carousel.js
js/src/collapse.js
js/src/dropdown.js
js/src/modal.js
js/src/popover.js
js/src/scrollspy.js
js/src/tab.js
js/src/toast.js
js/src/tooltip.js

index 41cff54db2d9f46982080119ae0667ae7e241d37..f1f612232d46d9fc8459bef0d616c3a536b44bcd 100644 (file)
@@ -24,7 +24,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'alert'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.alert'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -48,10 +47,6 @@ const CLASSNAME_SHOW = 'show'
 class Alert extends BaseComponent {
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get DATA_KEY() {
     return DATA_KEY
   }
index b1b85a4ee75760c68f27d377766ea0c3aebc3674..e9b4de669200ef9691d0395470b5140ad712aa46 100644 (file)
@@ -7,6 +7,14 @@
 
 import Data from './dom/data'
 
+/**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+const VERSION = '5.0.0-alpha3'
+
 class BaseComponent {
   constructor(element) {
     if (!element) {
@@ -28,6 +36,10 @@ class BaseComponent {
     return Data.getData(element, this.DATA_KEY)
   }
 
+  static get VERSION() {
+    return VERSION
+  }
+
   static get DATA_KEY() {
     return null
   }
index 8b7c6c953c9b533fccbcd6bf0bfed66d973db42b..2409955642de9bfc011fc6aa03dfdfe3a627968f 100644 (file)
@@ -17,7 +17,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'button'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.button'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -37,10 +36,6 @@ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
 class Button extends BaseComponent {
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get DATA_KEY() {
     return DATA_KEY
   }
index 35a1848f8732d074cf53a12a7cda329468053e49..7d2b4dc5082e542fb8720bf64ba0007bfd5aa2c5 100644 (file)
@@ -30,7 +30,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'carousel'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.carousel'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -129,10 +128,6 @@ class Carousel extends BaseComponent {
 
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get Default() {
     return Default
   }
index 9fb4d5edef2b6fa96b2937f41298fb57c2378634..da3e504d18cedec61794e232461de53d17d3ad05 100644 (file)
@@ -30,7 +30,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'collapse'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.collapse'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -108,10 +107,6 @@ class Collapse extends BaseComponent {
 
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get Default() {
     return Default
   }
index 3641d9f9d20c90be645fb4efcaa3a0ee2d4a6e2c..f9c945c33b0b82ece9342e10d8393a27b90db1e8 100644 (file)
@@ -28,7 +28,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'dropdown'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.dropdown'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -112,10 +111,6 @@ class Dropdown extends BaseComponent {
 
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get Default() {
     return Default
   }
index 449721caf796ba25135a57f8c14f6a661addec41..e3fe487a82fa3c95b36af81de7dbbb138357714a 100644 (file)
@@ -29,7 +29,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'modal'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.modal'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -99,10 +98,6 @@ class Modal extends BaseComponent {
 
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get Default() {
     return Default
   }
index bae5537aa20a4dd8eb267f33d5b495727a4c00bd..97db9a3f7d2a5d324a76ec414cb2d383c697277f 100644 (file)
@@ -17,7 +17,6 @@ import Tooltip from './tooltip'
  */
 
 const NAME = 'popover'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.popover'
 const EVENT_KEY = `.${DATA_KEY}`
 const CLASS_PREFIX = 'bs-popover'
@@ -67,10 +66,6 @@ const SELECTOR_CONTENT = '.popover-body'
 class Popover extends Tooltip {
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get Default() {
     return Default
   }
index 0df00e8f7bb79cbe12d1d1cf19bb9309133e68b4..4e88a2321c5186ecad8fe557bf9979e6139f17fb 100644 (file)
@@ -26,7 +26,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'scrollspy'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.scrollspy'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -88,10 +87,6 @@ class ScrollSpy extends BaseComponent {
 
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get Default() {
     return Default
   }
index a57d1b12ddf05eec6d988f3e08d4bc87372eb953..0e9755ea026425c1a38d629faad1a989d8f9d524 100644 (file)
@@ -26,7 +26,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'tab'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.tab'
 const EVENT_KEY = `.${DATA_KEY}`
 const DATA_API_KEY = '.data-api'
@@ -60,10 +59,6 @@ const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active'
 class Tab extends BaseComponent {
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get DATA_KEY() {
     return DATA_KEY
   }
index 04917869df3203445039eb3ba0a0fecf6daa63d6..065c6c753c2d4659f36143bbf896aeb8c22647f5 100644 (file)
@@ -26,7 +26,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'toast'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.toast'
 const EVENT_KEY = `.${DATA_KEY}`
 
@@ -73,10 +72,6 @@ class Toast extends BaseComponent {
 
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get DefaultType() {
     return DefaultType
   }
index b8443206530a2a477bb7df03c2ff99d587d58d4f..fae606322570a1e5b0f94f2cf9cdfd874c9f0254 100644 (file)
@@ -35,7 +35,6 @@ import BaseComponent from './base-component'
  */
 
 const NAME = 'tooltip'
-const VERSION = '5.0.0-alpha3'
 const DATA_KEY = 'bs.tooltip'
 const EVENT_KEY = `.${DATA_KEY}`
 const CLASS_PREFIX = 'bs-tooltip'
@@ -150,10 +149,6 @@ class Tooltip extends BaseComponent {
 
   // Getters
 
-  static get VERSION() {
-    return VERSION
-  }
-
   static get Default() {
     return Default
   }