|
1 | 1 | /*! |
2 | | - * Bootstrap v5.3.3 (https://getbootstrap.com/) |
3 | | - * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) |
| 2 | + * Bootstrap v5.3.4 (https://getbootstrap.com/) |
| 3 | + * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) |
4 | 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) |
5 | 5 | */ |
6 | 6 | (function (global, factory) { |
|
224 | 224 | * @param {HTMLElement} element |
225 | 225 | * @return void |
226 | 226 | * |
227 | | - * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation |
| 227 | + * @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation |
228 | 228 | */ |
229 | 229 | const reflow = element => { |
230 | 230 | element.offsetHeight; // eslint-disable-line no-unused-expressions |
|
269 | 269 | }); |
270 | 270 | }; |
271 | 271 | const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { |
272 | | - return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue; |
| 272 | + return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue; |
273 | 273 | }; |
274 | 274 | const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { |
275 | 275 | if (!waitForTransition) { |
|
591 | 591 | const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig')); |
592 | 592 | for (const key of bsKeys) { |
593 | 593 | let pureKey = key.replace(/^bs/, ''); |
594 | | - pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length); |
| 594 | + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1); |
595 | 595 | attributes[pureKey] = normalizeData(element.dataset[key]); |
596 | 596 | } |
597 | 597 | return attributes; |
|
666 | 666 | * Constants |
667 | 667 | */ |
668 | 668 |
|
669 | | - const VERSION = '5.3.3'; |
| 669 | + const VERSION = '5.3.4'; |
670 | 670 |
|
671 | 671 | /** |
672 | 672 | * Class definition |
|
1881 | 1881 | } |
1882 | 1882 | _createPopper() { |
1883 | 1883 | if (typeof Popper__namespace === 'undefined') { |
1884 | | - throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); |
| 1884 | + throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)'); |
1885 | 1885 | } |
1886 | 1886 | let referenceElement = this._element; |
1887 | 1887 | if (this._config.reference === 'parent') { |
|
1960 | 1960 | } |
1961 | 1961 | return { |
1962 | 1962 | ...defaultBsPopperConfig, |
1963 | | - ...execute(this._config.popperConfig, [defaultBsPopperConfig]) |
| 1963 | + ...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig]) |
1964 | 1964 | }; |
1965 | 1965 | } |
1966 | 1966 | _selectMenuItem({ |
|
3147 | 3147 | return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; |
3148 | 3148 | } |
3149 | 3149 | _resolvePossibleFunction(arg) { |
3150 | | - return execute(arg, [this]); |
| 3150 | + return execute(arg, [undefined, this]); |
3151 | 3151 | } |
3152 | 3152 | _putElementInTemplate(element, templateElement) { |
3153 | 3153 | if (this._config.html) { |
|
3246 | 3246 | class Tooltip extends BaseComponent { |
3247 | 3247 | constructor(element, config) { |
3248 | 3248 | if (typeof Popper__namespace === 'undefined') { |
3249 | | - throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)'); |
| 3249 | + throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)'); |
3250 | 3250 | } |
3251 | 3251 | super(element, config); |
3252 | 3252 |
|
|
3292 | 3292 | if (!this._isEnabled) { |
3293 | 3293 | return; |
3294 | 3294 | } |
3295 | | - this._activeTrigger.click = !this._activeTrigger.click; |
3296 | 3295 | if (this._isShown()) { |
3297 | 3296 | this._leave(); |
3298 | 3297 | return; |
|
3480 | 3479 | return offset; |
3481 | 3480 | } |
3482 | 3481 | _resolvePossibleFunction(arg) { |
3483 | | - return execute(arg, [this._element]); |
| 3482 | + return execute(arg, [this._element, this._element]); |
3484 | 3483 | } |
3485 | 3484 | _getPopperConfig(attachment) { |
3486 | 3485 | const defaultBsPopperConfig = { |
|
3518 | 3517 | }; |
3519 | 3518 | return { |
3520 | 3519 | ...defaultBsPopperConfig, |
3521 | | - ...execute(this._config.popperConfig, [defaultBsPopperConfig]) |
| 3520 | + ...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig]) |
3522 | 3521 | }; |
3523 | 3522 | } |
3524 | 3523 | _setListeners() { |
|
0 commit comments