@openeuropa/bcl-theme-joinup 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/oe-bcl-joinup.css +2285 -709
- package/css/oe-bcl-joinup.css.map +1 -1
- package/css/oe-bcl-joinup.min.css +1 -1
- package/css/oe-bcl-joinup.min.css.map +1 -1
- package/icons/bcl-default-icons.svg +1 -1
- package/icons/bootstrap-icons.svg +1 -1
- package/js/oe-bcl-joinup.bundle.js +526 -423
- package/js/oe-bcl-joinup.bundle.js.map +1 -1
- package/js/oe-bcl-joinup.bundle.min.js +1 -1
- package/js/oe-bcl-joinup.bundle.min.js.map +1 -1
- package/js/oe-bcl-joinup.esm.js +516 -413
- package/js/oe-bcl-joinup.esm.js.map +1 -1
- package/js/oe-bcl-joinup.esm.min.js +1 -1
- package/js/oe-bcl-joinup.esm.min.js.map +1 -1
- package/js/oe-bcl-joinup.umd.js +526 -423
- package/js/oe-bcl-joinup.umd.js.map +1 -1
- package/js/oe-bcl-joinup.umd.min.js +1 -1
- package/js/oe-bcl-joinup.umd.min.js.map +1 -1
- package/package.json +6 -6
|
@@ -6,7 +6,55 @@
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* --------------------------------------------------------------------------
|
|
9
|
-
* Bootstrap
|
|
9
|
+
* Bootstrap dom/data.js
|
|
10
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
11
|
+
* --------------------------------------------------------------------------
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Constants
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const elementMap = new Map();
|
|
19
|
+
var Data = {
|
|
20
|
+
set(element, key, instance) {
|
|
21
|
+
if (!elementMap.has(element)) {
|
|
22
|
+
elementMap.set(element, new Map());
|
|
23
|
+
}
|
|
24
|
+
const instanceMap = elementMap.get(element);
|
|
25
|
+
|
|
26
|
+
// make it clear we only want one instance per element
|
|
27
|
+
// can be removed later when multiple key/instances are fine to be used
|
|
28
|
+
if (!instanceMap.has(key) && instanceMap.size !== 0) {
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
30
|
+
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
instanceMap.set(key, instance);
|
|
34
|
+
},
|
|
35
|
+
get(element, key) {
|
|
36
|
+
if (elementMap.has(element)) {
|
|
37
|
+
return elementMap.get(element).get(key) || null;
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
},
|
|
41
|
+
remove(element, key) {
|
|
42
|
+
if (!elementMap.has(element)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const instanceMap = elementMap.get(element);
|
|
46
|
+
instanceMap.delete(key);
|
|
47
|
+
|
|
48
|
+
// free up element references if there are no instances left for an element
|
|
49
|
+
if (instanceMap.size === 0) {
|
|
50
|
+
elementMap.delete(element);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* --------------------------------------------------------------------------
|
|
57
|
+
* Bootstrap util/index.js
|
|
10
58
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
11
59
|
* --------------------------------------------------------------------------
|
|
12
60
|
*/
|
|
@@ -15,6 +63,19 @@
|
|
|
15
63
|
const MILLISECONDS_MULTIPLIER = 1000;
|
|
16
64
|
const TRANSITION_END = 'transitionend';
|
|
17
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Properly escape IDs selectors to handle weird IDs
|
|
68
|
+
* @param {string} selector
|
|
69
|
+
* @returns {string}
|
|
70
|
+
*/
|
|
71
|
+
const parseSelector = selector => {
|
|
72
|
+
if (selector && window.CSS && window.CSS.escape) {
|
|
73
|
+
// document.querySelector needs escaping to handle IDs (html5+) containing for instance /
|
|
74
|
+
selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`);
|
|
75
|
+
}
|
|
76
|
+
return selector;
|
|
77
|
+
};
|
|
78
|
+
|
|
18
79
|
// Shout-out Angus Croll (https://goo.gl/pxwQGp)
|
|
19
80
|
const toType = object => {
|
|
20
81
|
if (object === null || object === undefined) {
|
|
@@ -33,38 +94,6 @@
|
|
|
33
94
|
} while (document.getElementById(prefix));
|
|
34
95
|
return prefix;
|
|
35
96
|
};
|
|
36
|
-
const getSelector = element => {
|
|
37
|
-
let selector = element.getAttribute('data-bs-target');
|
|
38
|
-
if (!selector || selector === '#') {
|
|
39
|
-
let hrefAttribute = element.getAttribute('href');
|
|
40
|
-
|
|
41
|
-
// The only valid content that could double as a selector are IDs or classes,
|
|
42
|
-
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
|
|
43
|
-
// `document.querySelector` will rightfully complain it is invalid.
|
|
44
|
-
// See https://github.com/twbs/bootstrap/issues/32273
|
|
45
|
-
if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Just in case some CMS puts out a full URL with the anchor appended
|
|
50
|
-
if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
|
|
51
|
-
hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
|
|
52
|
-
}
|
|
53
|
-
selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
|
|
54
|
-
}
|
|
55
|
-
return selector;
|
|
56
|
-
};
|
|
57
|
-
const getSelectorFromElement = element => {
|
|
58
|
-
const selector = getSelector(element);
|
|
59
|
-
if (selector) {
|
|
60
|
-
return document.querySelector(selector) ? selector : null;
|
|
61
|
-
}
|
|
62
|
-
return null;
|
|
63
|
-
};
|
|
64
|
-
const getElementFromSelector = element => {
|
|
65
|
-
const selector = getSelector(element);
|
|
66
|
-
return selector ? document.querySelector(selector) : null;
|
|
67
|
-
};
|
|
68
97
|
const getTransitionDurationFromElement = element => {
|
|
69
98
|
if (!element) {
|
|
70
99
|
return 0;
|
|
@@ -91,7 +120,7 @@
|
|
|
91
120
|
const triggerTransitionEnd = element => {
|
|
92
121
|
element.dispatchEvent(new Event(TRANSITION_END));
|
|
93
122
|
};
|
|
94
|
-
const isElement$
|
|
123
|
+
const isElement$2 = object => {
|
|
95
124
|
if (!object || typeof object !== 'object') {
|
|
96
125
|
return false;
|
|
97
126
|
}
|
|
@@ -100,18 +129,18 @@
|
|
|
100
129
|
}
|
|
101
130
|
return typeof object.nodeType !== 'undefined';
|
|
102
131
|
};
|
|
103
|
-
const getElement = object => {
|
|
132
|
+
const getElement$1 = object => {
|
|
104
133
|
// it's a jQuery object or a node element
|
|
105
|
-
if (isElement$
|
|
134
|
+
if (isElement$2(object)) {
|
|
106
135
|
return object.jquery ? object[0] : object;
|
|
107
136
|
}
|
|
108
137
|
if (typeof object === 'string' && object.length > 0) {
|
|
109
|
-
return document.querySelector(object);
|
|
138
|
+
return document.querySelector(parseSelector(object));
|
|
110
139
|
}
|
|
111
140
|
return null;
|
|
112
141
|
};
|
|
113
142
|
const isVisible = element => {
|
|
114
|
-
if (!isElement$
|
|
143
|
+
if (!isElement$2(element) || element.getClientRects().length === 0) {
|
|
115
144
|
return false;
|
|
116
145
|
}
|
|
117
146
|
const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible';
|
|
@@ -176,32 +205,32 @@
|
|
|
176
205
|
const reflow = element => {
|
|
177
206
|
element.offsetHeight; // eslint-disable-line no-unused-expressions
|
|
178
207
|
};
|
|
179
|
-
const getjQuery = () => {
|
|
208
|
+
const getjQuery$1 = () => {
|
|
180
209
|
if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
181
210
|
return window.jQuery;
|
|
182
211
|
}
|
|
183
212
|
return null;
|
|
184
213
|
};
|
|
185
|
-
const DOMContentLoadedCallbacks = [];
|
|
186
|
-
const onDOMContentLoaded = callback => {
|
|
214
|
+
const DOMContentLoadedCallbacks$1 = [];
|
|
215
|
+
const onDOMContentLoaded$1 = callback => {
|
|
187
216
|
if (document.readyState === 'loading') {
|
|
188
217
|
// add listener on the first call when the document is in loading state
|
|
189
|
-
if (!DOMContentLoadedCallbacks.length) {
|
|
218
|
+
if (!DOMContentLoadedCallbacks$1.length) {
|
|
190
219
|
document.addEventListener('DOMContentLoaded', () => {
|
|
191
|
-
for (const callback of DOMContentLoadedCallbacks) {
|
|
220
|
+
for (const callback of DOMContentLoadedCallbacks$1) {
|
|
192
221
|
callback();
|
|
193
222
|
}
|
|
194
223
|
});
|
|
195
224
|
}
|
|
196
|
-
DOMContentLoadedCallbacks.push(callback);
|
|
225
|
+
DOMContentLoadedCallbacks$1.push(callback);
|
|
197
226
|
} else {
|
|
198
227
|
callback();
|
|
199
228
|
}
|
|
200
229
|
};
|
|
201
230
|
const isRTL = () => document.documentElement.dir === 'rtl';
|
|
202
|
-
const defineJQueryPlugin = plugin => {
|
|
203
|
-
onDOMContentLoaded(() => {
|
|
204
|
-
const $ = getjQuery();
|
|
231
|
+
const defineJQueryPlugin$1 = plugin => {
|
|
232
|
+
onDOMContentLoaded$1(() => {
|
|
233
|
+
const $ = getjQuery$1();
|
|
205
234
|
/* istanbul ignore if */
|
|
206
235
|
if ($) {
|
|
207
236
|
const name = plugin.NAME;
|
|
@@ -215,10 +244,8 @@
|
|
|
215
244
|
}
|
|
216
245
|
});
|
|
217
246
|
};
|
|
218
|
-
const execute =
|
|
219
|
-
|
|
220
|
-
callback();
|
|
221
|
-
}
|
|
247
|
+
const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
|
|
248
|
+
return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;
|
|
222
249
|
};
|
|
223
250
|
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
|
|
224
251
|
if (!waitForTransition) {
|
|
@@ -273,7 +300,7 @@
|
|
|
273
300
|
|
|
274
301
|
/**
|
|
275
302
|
* --------------------------------------------------------------------------
|
|
276
|
-
* Bootstrap
|
|
303
|
+
* Bootstrap dom/event-handler.js
|
|
277
304
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
278
305
|
* --------------------------------------------------------------------------
|
|
279
306
|
*/
|
|
@@ -344,7 +371,7 @@
|
|
|
344
371
|
}
|
|
345
372
|
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
|
|
346
373
|
const isDelegated = typeof handler === 'string';
|
|
347
|
-
//
|
|
374
|
+
// TODO: tooltip passes `false` instead of selector, so we need to check
|
|
348
375
|
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
|
|
349
376
|
let typeEvent = getTypeEvent(originalTypeEvent);
|
|
350
377
|
if (!nativeEvents.has(typeEvent)) {
|
|
@@ -396,9 +423,8 @@
|
|
|
396
423
|
}
|
|
397
424
|
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
|
|
398
425
|
const storeElementEvent = events[typeEvent] || {};
|
|
399
|
-
for (const handlerKey of Object.
|
|
426
|
+
for (const [handlerKey, event] of Object.entries(storeElementEvent)) {
|
|
400
427
|
if (handlerKey.includes(namespace)) {
|
|
401
|
-
const event = storeElementEvent[handlerKey];
|
|
402
428
|
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
|
403
429
|
}
|
|
404
430
|
}
|
|
@@ -437,10 +463,9 @@
|
|
|
437
463
|
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
|
|
438
464
|
}
|
|
439
465
|
}
|
|
440
|
-
for (const keyHandlers of Object.
|
|
466
|
+
for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {
|
|
441
467
|
const handlerKey = keyHandlers.replace(stripUidRegex, '');
|
|
442
468
|
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
|
|
443
|
-
const event = storeElementEvent[keyHandlers];
|
|
444
469
|
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
|
445
470
|
}
|
|
446
471
|
}
|
|
@@ -449,7 +474,7 @@
|
|
|
449
474
|
if (typeof event !== 'string' || !element) {
|
|
450
475
|
return null;
|
|
451
476
|
}
|
|
452
|
-
const $ = getjQuery();
|
|
477
|
+
const $ = getjQuery$1();
|
|
453
478
|
const typeEvent = getTypeEvent(event);
|
|
454
479
|
const inNamespace = event !== typeEvent;
|
|
455
480
|
let jQueryEvent = null;
|
|
@@ -463,11 +488,10 @@
|
|
|
463
488
|
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
|
|
464
489
|
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
|
465
490
|
}
|
|
466
|
-
|
|
491
|
+
const evt = hydrateObj(new Event(event, {
|
|
467
492
|
bubbles,
|
|
468
493
|
cancelable: true
|
|
469
|
-
});
|
|
470
|
-
evt = hydrateObj(evt, args);
|
|
494
|
+
}), args);
|
|
471
495
|
if (defaultPrevented) {
|
|
472
496
|
evt.preventDefault();
|
|
473
497
|
}
|
|
@@ -480,8 +504,8 @@
|
|
|
480
504
|
return evt;
|
|
481
505
|
}
|
|
482
506
|
};
|
|
483
|
-
function hydrateObj(obj, meta) {
|
|
484
|
-
for (const [key, value] of Object.entries(meta
|
|
507
|
+
function hydrateObj(obj, meta = {}) {
|
|
508
|
+
for (const [key, value] of Object.entries(meta)) {
|
|
485
509
|
try {
|
|
486
510
|
obj[key] = value;
|
|
487
511
|
} catch {
|
|
@@ -498,55 +522,7 @@
|
|
|
498
522
|
|
|
499
523
|
/**
|
|
500
524
|
* --------------------------------------------------------------------------
|
|
501
|
-
* Bootstrap
|
|
502
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
503
|
-
* --------------------------------------------------------------------------
|
|
504
|
-
*/
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Constants
|
|
508
|
-
*/
|
|
509
|
-
|
|
510
|
-
const elementMap = new Map();
|
|
511
|
-
var Data = {
|
|
512
|
-
set(element, key, instance) {
|
|
513
|
-
if (!elementMap.has(element)) {
|
|
514
|
-
elementMap.set(element, new Map());
|
|
515
|
-
}
|
|
516
|
-
const instanceMap = elementMap.get(element);
|
|
517
|
-
|
|
518
|
-
// make it clear we only want one instance per element
|
|
519
|
-
// can be removed later when multiple key/instances are fine to be used
|
|
520
|
-
if (!instanceMap.has(key) && instanceMap.size !== 0) {
|
|
521
|
-
// eslint-disable-next-line no-console
|
|
522
|
-
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
instanceMap.set(key, instance);
|
|
526
|
-
},
|
|
527
|
-
get(element, key) {
|
|
528
|
-
if (elementMap.has(element)) {
|
|
529
|
-
return elementMap.get(element).get(key) || null;
|
|
530
|
-
}
|
|
531
|
-
return null;
|
|
532
|
-
},
|
|
533
|
-
remove(element, key) {
|
|
534
|
-
if (!elementMap.has(element)) {
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
const instanceMap = elementMap.get(element);
|
|
538
|
-
instanceMap.delete(key);
|
|
539
|
-
|
|
540
|
-
// free up element references if there are no instances left for an element
|
|
541
|
-
if (instanceMap.size === 0) {
|
|
542
|
-
elementMap.delete(element);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* --------------------------------------------------------------------------
|
|
549
|
-
* Bootstrap (v5.2.3): dom/manipulator.js
|
|
525
|
+
* Bootstrap dom/manipulator.js
|
|
550
526
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
551
527
|
* --------------------------------------------------------------------------
|
|
552
528
|
*/
|
|
@@ -603,7 +579,7 @@
|
|
|
603
579
|
|
|
604
580
|
/**
|
|
605
581
|
* --------------------------------------------------------------------------
|
|
606
|
-
* Bootstrap
|
|
582
|
+
* Bootstrap util/config.js
|
|
607
583
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
608
584
|
* --------------------------------------------------------------------------
|
|
609
585
|
*/
|
|
@@ -634,20 +610,19 @@
|
|
|
634
610
|
return config;
|
|
635
611
|
}
|
|
636
612
|
_mergeConfigObj(config, element) {
|
|
637
|
-
const jsonConfig = isElement$
|
|
613
|
+
const jsonConfig = isElement$2(element) ? Manipulator$1.getDataAttribute(element, 'config') : {}; // try to parse
|
|
638
614
|
|
|
639
615
|
return {
|
|
640
616
|
...this.constructor.Default,
|
|
641
617
|
...(typeof jsonConfig === 'object' ? jsonConfig : {}),
|
|
642
|
-
...(isElement$
|
|
618
|
+
...(isElement$2(element) ? Manipulator$1.getDataAttributes(element) : {}),
|
|
643
619
|
...(typeof config === 'object' ? config : {})
|
|
644
620
|
};
|
|
645
621
|
}
|
|
646
622
|
_typeCheckConfig(config, configTypes = this.constructor.DefaultType) {
|
|
647
|
-
for (const property of Object.
|
|
648
|
-
const expectedTypes = configTypes[property];
|
|
623
|
+
for (const [property, expectedTypes] of Object.entries(configTypes)) {
|
|
649
624
|
const value = config[property];
|
|
650
|
-
const valueType = isElement$
|
|
625
|
+
const valueType = isElement$2(value) ? 'element' : toType(value);
|
|
651
626
|
if (!new RegExp(expectedTypes).test(valueType)) {
|
|
652
627
|
throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
|
|
653
628
|
}
|
|
@@ -657,7 +632,7 @@
|
|
|
657
632
|
|
|
658
633
|
/**
|
|
659
634
|
* --------------------------------------------------------------------------
|
|
660
|
-
* Bootstrap
|
|
635
|
+
* Bootstrap base-component.js
|
|
661
636
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
662
637
|
* --------------------------------------------------------------------------
|
|
663
638
|
*/
|
|
@@ -667,7 +642,7 @@
|
|
|
667
642
|
* Constants
|
|
668
643
|
*/
|
|
669
644
|
|
|
670
|
-
const VERSION = '5.
|
|
645
|
+
const VERSION = '5.3.3';
|
|
671
646
|
|
|
672
647
|
/**
|
|
673
648
|
* Class definition
|
|
@@ -676,7 +651,7 @@
|
|
|
676
651
|
class BaseComponent extends Config {
|
|
677
652
|
constructor(element, config) {
|
|
678
653
|
super();
|
|
679
|
-
element = getElement(element);
|
|
654
|
+
element = getElement$1(element);
|
|
680
655
|
if (!element) {
|
|
681
656
|
return;
|
|
682
657
|
}
|
|
@@ -705,7 +680,7 @@
|
|
|
705
680
|
|
|
706
681
|
// Static
|
|
707
682
|
static getInstance(element) {
|
|
708
|
-
return Data.get(getElement(element), this.DATA_KEY);
|
|
683
|
+
return Data.get(getElement$1(element), this.DATA_KEY);
|
|
709
684
|
}
|
|
710
685
|
static getOrCreateInstance(element, config = {}) {
|
|
711
686
|
return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
|
|
@@ -726,7 +701,96 @@
|
|
|
726
701
|
|
|
727
702
|
/**
|
|
728
703
|
* --------------------------------------------------------------------------
|
|
729
|
-
* Bootstrap
|
|
704
|
+
* Bootstrap dom/selector-engine.js
|
|
705
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
706
|
+
* --------------------------------------------------------------------------
|
|
707
|
+
*/
|
|
708
|
+
|
|
709
|
+
const getSelector$1 = element => {
|
|
710
|
+
let selector = element.getAttribute('data-bs-target');
|
|
711
|
+
if (!selector || selector === '#') {
|
|
712
|
+
let hrefAttribute = element.getAttribute('href');
|
|
713
|
+
|
|
714
|
+
// The only valid content that could double as a selector are IDs or classes,
|
|
715
|
+
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
|
|
716
|
+
// `document.querySelector` will rightfully complain it is invalid.
|
|
717
|
+
// See https://github.com/twbs/bootstrap/issues/32273
|
|
718
|
+
if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
|
|
719
|
+
return null;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
// Just in case some CMS puts out a full URL with the anchor appended
|
|
723
|
+
if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
|
|
724
|
+
hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
|
|
725
|
+
}
|
|
726
|
+
selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
|
|
727
|
+
}
|
|
728
|
+
return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null;
|
|
729
|
+
};
|
|
730
|
+
const SelectorEngine = {
|
|
731
|
+
find(selector, element = document.documentElement) {
|
|
732
|
+
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
|
|
733
|
+
},
|
|
734
|
+
findOne(selector, element = document.documentElement) {
|
|
735
|
+
return Element.prototype.querySelector.call(element, selector);
|
|
736
|
+
},
|
|
737
|
+
children(element, selector) {
|
|
738
|
+
return [].concat(...element.children).filter(child => child.matches(selector));
|
|
739
|
+
},
|
|
740
|
+
parents(element, selector) {
|
|
741
|
+
const parents = [];
|
|
742
|
+
let ancestor = element.parentNode.closest(selector);
|
|
743
|
+
while (ancestor) {
|
|
744
|
+
parents.push(ancestor);
|
|
745
|
+
ancestor = ancestor.parentNode.closest(selector);
|
|
746
|
+
}
|
|
747
|
+
return parents;
|
|
748
|
+
},
|
|
749
|
+
prev(element, selector) {
|
|
750
|
+
let previous = element.previousElementSibling;
|
|
751
|
+
while (previous) {
|
|
752
|
+
if (previous.matches(selector)) {
|
|
753
|
+
return [previous];
|
|
754
|
+
}
|
|
755
|
+
previous = previous.previousElementSibling;
|
|
756
|
+
}
|
|
757
|
+
return [];
|
|
758
|
+
},
|
|
759
|
+
// TODO: this is now unused; remove later along with prev()
|
|
760
|
+
next(element, selector) {
|
|
761
|
+
let next = element.nextElementSibling;
|
|
762
|
+
while (next) {
|
|
763
|
+
if (next.matches(selector)) {
|
|
764
|
+
return [next];
|
|
765
|
+
}
|
|
766
|
+
next = next.nextElementSibling;
|
|
767
|
+
}
|
|
768
|
+
return [];
|
|
769
|
+
},
|
|
770
|
+
focusableChildren(element) {
|
|
771
|
+
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
|
|
772
|
+
return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
|
|
773
|
+
},
|
|
774
|
+
getSelectorFromElement(element) {
|
|
775
|
+
const selector = getSelector$1(element);
|
|
776
|
+
if (selector) {
|
|
777
|
+
return SelectorEngine.findOne(selector) ? selector : null;
|
|
778
|
+
}
|
|
779
|
+
return null;
|
|
780
|
+
},
|
|
781
|
+
getElementFromSelector(element) {
|
|
782
|
+
const selector = getSelector$1(element);
|
|
783
|
+
return selector ? SelectorEngine.findOne(selector) : null;
|
|
784
|
+
},
|
|
785
|
+
getMultipleElementsFromSelector(element) {
|
|
786
|
+
const selector = getSelector$1(element);
|
|
787
|
+
return selector ? SelectorEngine.find(selector) : [];
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* --------------------------------------------------------------------------
|
|
793
|
+
* Bootstrap util/component-functions.js
|
|
730
794
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
731
795
|
* --------------------------------------------------------------------------
|
|
732
796
|
*/
|
|
@@ -741,7 +805,7 @@
|
|
|
741
805
|
if (isDisabled(this)) {
|
|
742
806
|
return;
|
|
743
807
|
}
|
|
744
|
-
const target = getElementFromSelector(this) || this.closest(`.${name}`);
|
|
808
|
+
const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);
|
|
745
809
|
const instance = component.getOrCreateInstance(target);
|
|
746
810
|
|
|
747
811
|
// Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
|
|
@@ -751,7 +815,7 @@
|
|
|
751
815
|
|
|
752
816
|
/**
|
|
753
817
|
* --------------------------------------------------------------------------
|
|
754
|
-
* Bootstrap
|
|
818
|
+
* Bootstrap alert.js
|
|
755
819
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
756
820
|
* --------------------------------------------------------------------------
|
|
757
821
|
*/
|
|
@@ -822,11 +886,11 @@
|
|
|
822
886
|
* jQuery
|
|
823
887
|
*/
|
|
824
888
|
|
|
825
|
-
defineJQueryPlugin(Alert);
|
|
889
|
+
defineJQueryPlugin$1(Alert);
|
|
826
890
|
|
|
827
891
|
/**
|
|
828
892
|
* --------------------------------------------------------------------------
|
|
829
|
-
* Bootstrap
|
|
893
|
+
* Bootstrap button.js
|
|
830
894
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
831
895
|
* --------------------------------------------------------------------------
|
|
832
896
|
*/
|
|
@@ -886,69 +950,11 @@
|
|
|
886
950
|
* jQuery
|
|
887
951
|
*/
|
|
888
952
|
|
|
889
|
-
defineJQueryPlugin(Button);
|
|
890
|
-
|
|
891
|
-
/**
|
|
892
|
-
* --------------------------------------------------------------------------
|
|
893
|
-
* Bootstrap (v5.2.3): dom/selector-engine.js
|
|
894
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
895
|
-
* --------------------------------------------------------------------------
|
|
896
|
-
*/
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* Constants
|
|
901
|
-
*/
|
|
902
|
-
|
|
903
|
-
const SelectorEngine = {
|
|
904
|
-
find(selector, element = document.documentElement) {
|
|
905
|
-
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
|
|
906
|
-
},
|
|
907
|
-
findOne(selector, element = document.documentElement) {
|
|
908
|
-
return Element.prototype.querySelector.call(element, selector);
|
|
909
|
-
},
|
|
910
|
-
children(element, selector) {
|
|
911
|
-
return [].concat(...element.children).filter(child => child.matches(selector));
|
|
912
|
-
},
|
|
913
|
-
parents(element, selector) {
|
|
914
|
-
const parents = [];
|
|
915
|
-
let ancestor = element.parentNode.closest(selector);
|
|
916
|
-
while (ancestor) {
|
|
917
|
-
parents.push(ancestor);
|
|
918
|
-
ancestor = ancestor.parentNode.closest(selector);
|
|
919
|
-
}
|
|
920
|
-
return parents;
|
|
921
|
-
},
|
|
922
|
-
prev(element, selector) {
|
|
923
|
-
let previous = element.previousElementSibling;
|
|
924
|
-
while (previous) {
|
|
925
|
-
if (previous.matches(selector)) {
|
|
926
|
-
return [previous];
|
|
927
|
-
}
|
|
928
|
-
previous = previous.previousElementSibling;
|
|
929
|
-
}
|
|
930
|
-
return [];
|
|
931
|
-
},
|
|
932
|
-
// TODO: this is now unused; remove later along with prev()
|
|
933
|
-
next(element, selector) {
|
|
934
|
-
let next = element.nextElementSibling;
|
|
935
|
-
while (next) {
|
|
936
|
-
if (next.matches(selector)) {
|
|
937
|
-
return [next];
|
|
938
|
-
}
|
|
939
|
-
next = next.nextElementSibling;
|
|
940
|
-
}
|
|
941
|
-
return [];
|
|
942
|
-
},
|
|
943
|
-
focusableChildren(element) {
|
|
944
|
-
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
|
|
945
|
-
return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
|
|
946
|
-
}
|
|
947
|
-
};
|
|
953
|
+
defineJQueryPlugin$1(Button);
|
|
948
954
|
|
|
949
955
|
/**
|
|
950
956
|
* --------------------------------------------------------------------------
|
|
951
|
-
* Bootstrap
|
|
957
|
+
* Bootstrap util/swipe.js
|
|
952
958
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
953
959
|
* --------------------------------------------------------------------------
|
|
954
960
|
*/
|
|
@@ -1068,7 +1074,7 @@
|
|
|
1068
1074
|
|
|
1069
1075
|
/**
|
|
1070
1076
|
* --------------------------------------------------------------------------
|
|
1071
|
-
* Bootstrap
|
|
1077
|
+
* Bootstrap carousel.js
|
|
1072
1078
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1073
1079
|
* --------------------------------------------------------------------------
|
|
1074
1080
|
*/
|
|
@@ -1329,7 +1335,7 @@
|
|
|
1329
1335
|
}
|
|
1330
1336
|
if (!activeElement || !nextElement) {
|
|
1331
1337
|
// Some weirdness is happening, so we bail
|
|
1332
|
-
//
|
|
1338
|
+
// TODO: change tests that use empty divs to avoid this check
|
|
1333
1339
|
return;
|
|
1334
1340
|
}
|
|
1335
1341
|
const isCycling = Boolean(this._interval);
|
|
@@ -1406,7 +1412,7 @@
|
|
|
1406
1412
|
*/
|
|
1407
1413
|
|
|
1408
1414
|
EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_SLIDE, function (event) {
|
|
1409
|
-
const target = getElementFromSelector(this);
|
|
1415
|
+
const target = SelectorEngine.getElementFromSelector(this);
|
|
1410
1416
|
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
|
1411
1417
|
return;
|
|
1412
1418
|
}
|
|
@@ -1437,11 +1443,11 @@
|
|
|
1437
1443
|
* jQuery
|
|
1438
1444
|
*/
|
|
1439
1445
|
|
|
1440
|
-
defineJQueryPlugin(Carousel);
|
|
1446
|
+
defineJQueryPlugin$1(Carousel);
|
|
1441
1447
|
|
|
1442
1448
|
/**
|
|
1443
1449
|
* --------------------------------------------------------------------------
|
|
1444
|
-
* Bootstrap
|
|
1450
|
+
* Bootstrap collapse.js
|
|
1445
1451
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1446
1452
|
* --------------------------------------------------------------------------
|
|
1447
1453
|
*/
|
|
@@ -1490,7 +1496,7 @@
|
|
|
1490
1496
|
this._triggerArray = [];
|
|
1491
1497
|
const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
|
|
1492
1498
|
for (const elem of toggleList) {
|
|
1493
|
-
const selector = getSelectorFromElement(elem);
|
|
1499
|
+
const selector = SelectorEngine.getSelectorFromElement(elem);
|
|
1494
1500
|
const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);
|
|
1495
1501
|
if (selector !== null && filterElement.length) {
|
|
1496
1502
|
this._triggerArray.push(elem);
|
|
@@ -1578,7 +1584,7 @@
|
|
|
1578
1584
|
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
|
1579
1585
|
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
|
|
1580
1586
|
for (const trigger of this._triggerArray) {
|
|
1581
|
-
const element = getElementFromSelector(trigger);
|
|
1587
|
+
const element = SelectorEngine.getElementFromSelector(trigger);
|
|
1582
1588
|
if (element && !this._isShown(element)) {
|
|
1583
1589
|
this._addAriaAndCollapsedClass([trigger], false);
|
|
1584
1590
|
}
|
|
@@ -1600,7 +1606,7 @@
|
|
|
1600
1606
|
// Private
|
|
1601
1607
|
_configAfterMerge(config) {
|
|
1602
1608
|
config.toggle = Boolean(config.toggle); // Coerce string values
|
|
1603
|
-
config.parent = getElement(config.parent);
|
|
1609
|
+
config.parent = getElement$1(config.parent);
|
|
1604
1610
|
return config;
|
|
1605
1611
|
}
|
|
1606
1612
|
_getDimension() {
|
|
@@ -1612,7 +1618,7 @@
|
|
|
1612
1618
|
}
|
|
1613
1619
|
const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);
|
|
1614
1620
|
for (const element of children) {
|
|
1615
|
-
const selected = getElementFromSelector(element);
|
|
1621
|
+
const selected = SelectorEngine.getElementFromSelector(element);
|
|
1616
1622
|
if (selected) {
|
|
1617
1623
|
this._addAriaAndCollapsedClass([element], this._isShown(selected));
|
|
1618
1624
|
}
|
|
@@ -1660,9 +1666,7 @@
|
|
|
1660
1666
|
if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
|
|
1661
1667
|
event.preventDefault();
|
|
1662
1668
|
}
|
|
1663
|
-
const
|
|
1664
|
-
const selectorElements = SelectorEngine.find(selector);
|
|
1665
|
-
for (const element of selectorElements) {
|
|
1669
|
+
for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {
|
|
1666
1670
|
Collapse.getOrCreateInstance(element, {
|
|
1667
1671
|
toggle: false
|
|
1668
1672
|
}).toggle();
|
|
@@ -1673,7 +1677,7 @@
|
|
|
1673
1677
|
* jQuery
|
|
1674
1678
|
*/
|
|
1675
1679
|
|
|
1676
|
-
defineJQueryPlugin(Collapse);
|
|
1680
|
+
defineJQueryPlugin$1(Collapse);
|
|
1677
1681
|
|
|
1678
1682
|
var top = 'top';
|
|
1679
1683
|
var bottom = 'bottom';
|
|
@@ -1722,7 +1726,7 @@
|
|
|
1722
1726
|
return node;
|
|
1723
1727
|
}
|
|
1724
1728
|
|
|
1725
|
-
function isElement(node) {
|
|
1729
|
+
function isElement$1(node) {
|
|
1726
1730
|
var OwnElement = getWindow(node).Element;
|
|
1727
1731
|
return node instanceof OwnElement || node instanceof Element;
|
|
1728
1732
|
}
|
|
@@ -1851,7 +1855,7 @@
|
|
|
1851
1855
|
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
1852
1856
|
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
1853
1857
|
}
|
|
1854
|
-
var _ref = isElement(element) ? getWindow(element) : window,
|
|
1858
|
+
var _ref = isElement$1(element) ? getWindow(element) : window,
|
|
1855
1859
|
visualViewport = _ref.visualViewport;
|
|
1856
1860
|
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
1857
1861
|
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
@@ -1922,7 +1926,7 @@
|
|
|
1922
1926
|
|
|
1923
1927
|
function getDocumentElement(element) {
|
|
1924
1928
|
// $FlowFixMe[incompatible-return]: assume body is always available
|
|
1925
|
-
return ((isElement(element) ? element.ownerDocument :
|
|
1929
|
+
return ((isElement$1(element) ? element.ownerDocument :
|
|
1926
1930
|
// $FlowFixMe[prop-missing]
|
|
1927
1931
|
element.document) || window.document).documentElement;
|
|
1928
1932
|
}
|
|
@@ -2441,7 +2445,7 @@
|
|
|
2441
2445
|
return rect;
|
|
2442
2446
|
}
|
|
2443
2447
|
function getClientRectFromMixedType(element, clippingParent, strategy) {
|
|
2444
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2448
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2445
2449
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
2446
2450
|
// clipping (or hiding) overflowing elements with a position different from
|
|
2447
2451
|
// `initial`
|
|
@@ -2450,12 +2454,12 @@
|
|
|
2450
2454
|
var clippingParents = listScrollParents(getParentNode(element));
|
|
2451
2455
|
var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;
|
|
2452
2456
|
var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
|
2453
|
-
if (!isElement(clipperElement)) {
|
|
2457
|
+
if (!isElement$1(clipperElement)) {
|
|
2454
2458
|
return [];
|
|
2455
2459
|
} // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
|
|
2456
2460
|
|
|
2457
2461
|
return clippingParents.filter(function (clippingParent) {
|
|
2458
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
2462
|
+
return isElement$1(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
2459
2463
|
});
|
|
2460
2464
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
2461
2465
|
// clipping parents
|
|
@@ -2557,7 +2561,7 @@
|
|
|
2557
2561
|
var altContext = elementContext === popper ? reference : popper;
|
|
2558
2562
|
var popperRect = state.rects.popper;
|
|
2559
2563
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
2560
|
-
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
|
|
2564
|
+
var clippingClientRect = getClippingRect(isElement$1(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
|
|
2561
2565
|
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
2562
2566
|
var popperOffsets = computeOffsets({
|
|
2563
2567
|
reference: referenceClientRect,
|
|
@@ -3161,7 +3165,7 @@
|
|
|
3161
3165
|
cleanupModifierEffects();
|
|
3162
3166
|
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
3163
3167
|
state.scrollParents = {
|
|
3164
|
-
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
|
3168
|
+
reference: isElement$1(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
|
3165
3169
|
popper: listScrollParents(popper)
|
|
3166
3170
|
}; // Orders the modifiers based on their dependencies and `phase`
|
|
3167
3171
|
// properties
|
|
@@ -3340,7 +3344,7 @@
|
|
|
3340
3344
|
|
|
3341
3345
|
/**
|
|
3342
3346
|
* --------------------------------------------------------------------------
|
|
3343
|
-
* Bootstrap
|
|
3347
|
+
* Bootstrap dropdown.js
|
|
3344
3348
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3345
3349
|
* --------------------------------------------------------------------------
|
|
3346
3350
|
*/
|
|
@@ -3413,7 +3417,7 @@
|
|
|
3413
3417
|
super(element, config);
|
|
3414
3418
|
this._popper = null;
|
|
3415
3419
|
this._parent = this._element.parentNode; // dropdown wrapper
|
|
3416
|
-
//
|
|
3420
|
+
// TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
3417
3421
|
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
|
3418
3422
|
this._inNavbar = this._detectNavbar();
|
|
3419
3423
|
}
|
|
@@ -3508,7 +3512,7 @@
|
|
|
3508
3512
|
}
|
|
3509
3513
|
_getConfig(config) {
|
|
3510
3514
|
config = super._getConfig(config);
|
|
3511
|
-
if (typeof config.reference === 'object' && !isElement$
|
|
3515
|
+
if (typeof config.reference === 'object' && !isElement$2(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
|
|
3512
3516
|
// Popper virtual elements require a getBoundingClientRect method
|
|
3513
3517
|
throw new TypeError(`${NAME$c.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
|
|
3514
3518
|
}
|
|
@@ -3521,8 +3525,8 @@
|
|
|
3521
3525
|
let referenceElement = this._element;
|
|
3522
3526
|
if (this._config.reference === 'parent') {
|
|
3523
3527
|
referenceElement = this._parent;
|
|
3524
|
-
} else if (isElement$
|
|
3525
|
-
referenceElement = getElement(this._config.reference);
|
|
3528
|
+
} else if (isElement$2(this._config.reference)) {
|
|
3529
|
+
referenceElement = getElement$1(this._config.reference);
|
|
3526
3530
|
} else if (typeof this._config.reference === 'object') {
|
|
3527
3531
|
referenceElement = this._config.reference;
|
|
3528
3532
|
}
|
|
@@ -3587,7 +3591,7 @@
|
|
|
3587
3591
|
|
|
3588
3592
|
// Disable Popper if we have a static display or Dropdown is in Navbar
|
|
3589
3593
|
if (this._inNavbar || this._config.display === 'static') {
|
|
3590
|
-
Manipulator$1.setDataAttribute(this._menu, 'popper', 'static'); //
|
|
3594
|
+
Manipulator$1.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
|
|
3591
3595
|
defaultBsPopperConfig.modifiers = [{
|
|
3592
3596
|
name: 'applyStyles',
|
|
3593
3597
|
enabled: false
|
|
@@ -3595,7 +3599,7 @@
|
|
|
3595
3599
|
}
|
|
3596
3600
|
return {
|
|
3597
3601
|
...defaultBsPopperConfig,
|
|
3598
|
-
...(
|
|
3602
|
+
...execute(this._config.popperConfig, [defaultBsPopperConfig])
|
|
3599
3603
|
};
|
|
3600
3604
|
}
|
|
3601
3605
|
_selectMenuItem({
|
|
@@ -3669,7 +3673,7 @@
|
|
|
3669
3673
|
}
|
|
3670
3674
|
event.preventDefault();
|
|
3671
3675
|
|
|
3672
|
-
//
|
|
3676
|
+
// TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
3673
3677
|
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
|
|
3674
3678
|
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
|
3675
3679
|
if (isUpOrDownEvent) {
|
|
@@ -3704,7 +3708,7 @@
|
|
|
3704
3708
|
* jQuery
|
|
3705
3709
|
*/
|
|
3706
3710
|
|
|
3707
|
-
defineJQueryPlugin(Dropdown);
|
|
3711
|
+
defineJQueryPlugin$1(Dropdown);
|
|
3708
3712
|
|
|
3709
3713
|
/**
|
|
3710
3714
|
* --------------------------------------------------------------------------
|
|
@@ -3806,135 +3810,37 @@
|
|
|
3806
3810
|
}
|
|
3807
3811
|
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
|
|
3808
3812
|
throw new TypeError(`No method named "${config}"`);
|
|
3809
|
-
}
|
|
3810
|
-
data[config](this);
|
|
3811
|
-
});
|
|
3812
|
-
}
|
|
3813
|
-
}
|
|
3814
|
-
|
|
3815
|
-
/**
|
|
3816
|
-
* ------------------------------------------------------------------------
|
|
3817
|
-
* Data Api implementation
|
|
3818
|
-
* ------------------------------------------------------------------------
|
|
3819
|
-
*/
|
|
3820
|
-
|
|
3821
|
-
EventHandler.on(document, EVENT_CLICK_DATA_API$3, THUMBNAIL_SELECTOR, event => {
|
|
3822
|
-
const gallery = event.target.closest('div.bcl-gallery');
|
|
3823
|
-
const firstSlide = event.target.parentNode.getAttribute('data-bs-slide-to');
|
|
3824
|
-
gallery.dataset.galleryStart = firstSlide;
|
|
3825
|
-
Gallery.getOrCreateInstance(gallery);
|
|
3826
|
-
});
|
|
3827
|
-
|
|
3828
|
-
/**
|
|
3829
|
-
* ------------------------------------------------------------------------
|
|
3830
|
-
* jQuery
|
|
3831
|
-
* ------------------------------------------------------------------------
|
|
3832
|
-
* add .gallery to jQuery only if jQuery is present
|
|
3833
|
-
*/
|
|
3834
|
-
|
|
3835
|
-
defineJQueryPlugin(Gallery);
|
|
3836
|
-
|
|
3837
|
-
/**
|
|
3838
|
-
* --------------------------------------------------------------------------
|
|
3839
|
-
* Bootstrap (v5.2.3): util/scrollBar.js
|
|
3840
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3841
|
-
* --------------------------------------------------------------------------
|
|
3842
|
-
*/
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
/**
|
|
3846
|
-
* Constants
|
|
3847
|
-
*/
|
|
3848
|
-
|
|
3849
|
-
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
|
3850
|
-
const SELECTOR_STICKY_CONTENT = '.sticky-top';
|
|
3851
|
-
const PROPERTY_PADDING = 'padding-right';
|
|
3852
|
-
const PROPERTY_MARGIN = 'margin-right';
|
|
3853
|
-
|
|
3854
|
-
/**
|
|
3855
|
-
* Class definition
|
|
3856
|
-
*/
|
|
3857
|
-
|
|
3858
|
-
class ScrollBarHelper {
|
|
3859
|
-
constructor() {
|
|
3860
|
-
this._element = document.body;
|
|
3861
|
-
}
|
|
3862
|
-
|
|
3863
|
-
// Public
|
|
3864
|
-
getWidth() {
|
|
3865
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
3866
|
-
const documentWidth = document.documentElement.clientWidth;
|
|
3867
|
-
return Math.abs(window.innerWidth - documentWidth);
|
|
3868
|
-
}
|
|
3869
|
-
hide() {
|
|
3870
|
-
const width = this.getWidth();
|
|
3871
|
-
this._disableOverFlow();
|
|
3872
|
-
// give padding to element to balance the hidden scrollbar width
|
|
3873
|
-
this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
3874
|
-
// trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
|
|
3875
|
-
this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
3876
|
-
this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
|
|
3877
|
-
}
|
|
3878
|
-
reset() {
|
|
3879
|
-
this._resetElementAttributes(this._element, 'overflow');
|
|
3880
|
-
this._resetElementAttributes(this._element, PROPERTY_PADDING);
|
|
3881
|
-
this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
|
|
3882
|
-
this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
|
|
3883
|
-
}
|
|
3884
|
-
isOverflowing() {
|
|
3885
|
-
return this.getWidth() > 0;
|
|
3886
|
-
}
|
|
3887
|
-
|
|
3888
|
-
// Private
|
|
3889
|
-
_disableOverFlow() {
|
|
3890
|
-
this._saveInitialAttribute(this._element, 'overflow');
|
|
3891
|
-
this._element.style.overflow = 'hidden';
|
|
3892
|
-
}
|
|
3893
|
-
_setElementAttributes(selector, styleProperty, callback) {
|
|
3894
|
-
const scrollbarWidth = this.getWidth();
|
|
3895
|
-
const manipulationCallBack = element => {
|
|
3896
|
-
if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
|
|
3897
|
-
return;
|
|
3898
|
-
}
|
|
3899
|
-
this._saveInitialAttribute(element, styleProperty);
|
|
3900
|
-
const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
|
|
3901
|
-
element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
|
|
3902
|
-
};
|
|
3903
|
-
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
3904
|
-
}
|
|
3905
|
-
_saveInitialAttribute(element, styleProperty) {
|
|
3906
|
-
const actualValue = element.style.getPropertyValue(styleProperty);
|
|
3907
|
-
if (actualValue) {
|
|
3908
|
-
Manipulator$1.setDataAttribute(element, styleProperty, actualValue);
|
|
3909
|
-
}
|
|
3910
|
-
}
|
|
3911
|
-
_resetElementAttributes(selector, styleProperty) {
|
|
3912
|
-
const manipulationCallBack = element => {
|
|
3913
|
-
const value = Manipulator$1.getDataAttribute(element, styleProperty);
|
|
3914
|
-
// We only want to remove the property if the value is `null`; the value can also be zero
|
|
3915
|
-
if (value === null) {
|
|
3916
|
-
element.style.removeProperty(styleProperty);
|
|
3917
|
-
return;
|
|
3918
|
-
}
|
|
3919
|
-
Manipulator$1.removeDataAttribute(element, styleProperty);
|
|
3920
|
-
element.style.setProperty(styleProperty, value);
|
|
3921
|
-
};
|
|
3922
|
-
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
3923
|
-
}
|
|
3924
|
-
_applyManipulationCallback(selector, callBack) {
|
|
3925
|
-
if (isElement$1(selector)) {
|
|
3926
|
-
callBack(selector);
|
|
3927
|
-
return;
|
|
3928
|
-
}
|
|
3929
|
-
for (const sel of SelectorEngine.find(selector, this._element)) {
|
|
3930
|
-
callBack(sel);
|
|
3931
|
-
}
|
|
3813
|
+
}
|
|
3814
|
+
data[config](this);
|
|
3815
|
+
});
|
|
3932
3816
|
}
|
|
3933
3817
|
}
|
|
3934
3818
|
|
|
3819
|
+
/**
|
|
3820
|
+
* ------------------------------------------------------------------------
|
|
3821
|
+
* Data Api implementation
|
|
3822
|
+
* ------------------------------------------------------------------------
|
|
3823
|
+
*/
|
|
3824
|
+
|
|
3825
|
+
EventHandler.on(document, EVENT_CLICK_DATA_API$3, THUMBNAIL_SELECTOR, event => {
|
|
3826
|
+
const gallery = event.target.closest('div.bcl-gallery');
|
|
3827
|
+
const firstSlide = event.target.parentNode.getAttribute('data-bs-slide-to');
|
|
3828
|
+
gallery.dataset.galleryStart = firstSlide;
|
|
3829
|
+
Gallery.getOrCreateInstance(gallery);
|
|
3830
|
+
});
|
|
3831
|
+
|
|
3832
|
+
/**
|
|
3833
|
+
* ------------------------------------------------------------------------
|
|
3834
|
+
* jQuery
|
|
3835
|
+
* ------------------------------------------------------------------------
|
|
3836
|
+
* add .gallery to jQuery only if jQuery is present
|
|
3837
|
+
*/
|
|
3838
|
+
|
|
3839
|
+
defineJQueryPlugin$1(Gallery);
|
|
3840
|
+
|
|
3935
3841
|
/**
|
|
3936
3842
|
* --------------------------------------------------------------------------
|
|
3937
|
-
* Bootstrap
|
|
3843
|
+
* Bootstrap util/backdrop.js
|
|
3938
3844
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3939
3845
|
* --------------------------------------------------------------------------
|
|
3940
3846
|
*/
|
|
@@ -4037,7 +3943,7 @@
|
|
|
4037
3943
|
}
|
|
4038
3944
|
_configAfterMerge(config) {
|
|
4039
3945
|
// use getElement() with the default "body" to get a fresh Element on each instantiation
|
|
4040
|
-
config.rootElement = getElement(config.rootElement);
|
|
3946
|
+
config.rootElement = getElement$1(config.rootElement);
|
|
4041
3947
|
return config;
|
|
4042
3948
|
}
|
|
4043
3949
|
_append() {
|
|
@@ -4058,7 +3964,7 @@
|
|
|
4058
3964
|
|
|
4059
3965
|
/**
|
|
4060
3966
|
* --------------------------------------------------------------------------
|
|
4061
|
-
* Bootstrap
|
|
3967
|
+
* Bootstrap util/focustrap.js
|
|
4062
3968
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4063
3969
|
* --------------------------------------------------------------------------
|
|
4064
3970
|
*/
|
|
@@ -4156,7 +4062,105 @@
|
|
|
4156
4062
|
|
|
4157
4063
|
/**
|
|
4158
4064
|
* --------------------------------------------------------------------------
|
|
4159
|
-
* Bootstrap
|
|
4065
|
+
* Bootstrap util/scrollBar.js
|
|
4066
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4067
|
+
* --------------------------------------------------------------------------
|
|
4068
|
+
*/
|
|
4069
|
+
|
|
4070
|
+
|
|
4071
|
+
/**
|
|
4072
|
+
* Constants
|
|
4073
|
+
*/
|
|
4074
|
+
|
|
4075
|
+
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
|
4076
|
+
const SELECTOR_STICKY_CONTENT = '.sticky-top';
|
|
4077
|
+
const PROPERTY_PADDING = 'padding-right';
|
|
4078
|
+
const PROPERTY_MARGIN = 'margin-right';
|
|
4079
|
+
|
|
4080
|
+
/**
|
|
4081
|
+
* Class definition
|
|
4082
|
+
*/
|
|
4083
|
+
|
|
4084
|
+
class ScrollBarHelper {
|
|
4085
|
+
constructor() {
|
|
4086
|
+
this._element = document.body;
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
// Public
|
|
4090
|
+
getWidth() {
|
|
4091
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
4092
|
+
const documentWidth = document.documentElement.clientWidth;
|
|
4093
|
+
return Math.abs(window.innerWidth - documentWidth);
|
|
4094
|
+
}
|
|
4095
|
+
hide() {
|
|
4096
|
+
const width = this.getWidth();
|
|
4097
|
+
this._disableOverFlow();
|
|
4098
|
+
// give padding to element to balance the hidden scrollbar width
|
|
4099
|
+
this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
4100
|
+
// trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
|
|
4101
|
+
this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
4102
|
+
this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
|
|
4103
|
+
}
|
|
4104
|
+
reset() {
|
|
4105
|
+
this._resetElementAttributes(this._element, 'overflow');
|
|
4106
|
+
this._resetElementAttributes(this._element, PROPERTY_PADDING);
|
|
4107
|
+
this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
|
|
4108
|
+
this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
|
|
4109
|
+
}
|
|
4110
|
+
isOverflowing() {
|
|
4111
|
+
return this.getWidth() > 0;
|
|
4112
|
+
}
|
|
4113
|
+
|
|
4114
|
+
// Private
|
|
4115
|
+
_disableOverFlow() {
|
|
4116
|
+
this._saveInitialAttribute(this._element, 'overflow');
|
|
4117
|
+
this._element.style.overflow = 'hidden';
|
|
4118
|
+
}
|
|
4119
|
+
_setElementAttributes(selector, styleProperty, callback) {
|
|
4120
|
+
const scrollbarWidth = this.getWidth();
|
|
4121
|
+
const manipulationCallBack = element => {
|
|
4122
|
+
if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
|
|
4123
|
+
return;
|
|
4124
|
+
}
|
|
4125
|
+
this._saveInitialAttribute(element, styleProperty);
|
|
4126
|
+
const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
|
|
4127
|
+
element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
|
|
4128
|
+
};
|
|
4129
|
+
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
4130
|
+
}
|
|
4131
|
+
_saveInitialAttribute(element, styleProperty) {
|
|
4132
|
+
const actualValue = element.style.getPropertyValue(styleProperty);
|
|
4133
|
+
if (actualValue) {
|
|
4134
|
+
Manipulator$1.setDataAttribute(element, styleProperty, actualValue);
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
_resetElementAttributes(selector, styleProperty) {
|
|
4138
|
+
const manipulationCallBack = element => {
|
|
4139
|
+
const value = Manipulator$1.getDataAttribute(element, styleProperty);
|
|
4140
|
+
// We only want to remove the property if the value is `null`; the value can also be zero
|
|
4141
|
+
if (value === null) {
|
|
4142
|
+
element.style.removeProperty(styleProperty);
|
|
4143
|
+
return;
|
|
4144
|
+
}
|
|
4145
|
+
Manipulator$1.removeDataAttribute(element, styleProperty);
|
|
4146
|
+
element.style.setProperty(styleProperty, value);
|
|
4147
|
+
};
|
|
4148
|
+
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
4149
|
+
}
|
|
4150
|
+
_applyManipulationCallback(selector, callBack) {
|
|
4151
|
+
if (isElement$2(selector)) {
|
|
4152
|
+
callBack(selector);
|
|
4153
|
+
return;
|
|
4154
|
+
}
|
|
4155
|
+
for (const sel of SelectorEngine.find(selector, this._element)) {
|
|
4156
|
+
callBack(sel);
|
|
4157
|
+
}
|
|
4158
|
+
}
|
|
4159
|
+
}
|
|
4160
|
+
|
|
4161
|
+
/**
|
|
4162
|
+
* --------------------------------------------------------------------------
|
|
4163
|
+
* Bootstrap modal.js
|
|
4160
4164
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4161
4165
|
* --------------------------------------------------------------------------
|
|
4162
4166
|
*/
|
|
@@ -4263,9 +4267,8 @@
|
|
|
4263
4267
|
this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
|
|
4264
4268
|
}
|
|
4265
4269
|
dispose() {
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
}
|
|
4270
|
+
EventHandler.off(window, EVENT_KEY$5);
|
|
4271
|
+
EventHandler.off(this._dialog, EVENT_KEY$5);
|
|
4269
4272
|
this._backdrop.dispose();
|
|
4270
4273
|
this._focustrap.deactivate();
|
|
4271
4274
|
super.dispose();
|
|
@@ -4320,7 +4323,6 @@
|
|
|
4320
4323
|
return;
|
|
4321
4324
|
}
|
|
4322
4325
|
if (this._config.keyboard) {
|
|
4323
|
-
event.preventDefault();
|
|
4324
4326
|
this.hide();
|
|
4325
4327
|
return;
|
|
4326
4328
|
}
|
|
@@ -4429,7 +4431,7 @@
|
|
|
4429
4431
|
*/
|
|
4430
4432
|
|
|
4431
4433
|
EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
|
|
4432
|
-
const target = getElementFromSelector(this);
|
|
4434
|
+
const target = SelectorEngine.getElementFromSelector(this);
|
|
4433
4435
|
if (['A', 'AREA'].includes(this.tagName)) {
|
|
4434
4436
|
event.preventDefault();
|
|
4435
4437
|
}
|
|
@@ -4459,11 +4461,11 @@
|
|
|
4459
4461
|
* jQuery
|
|
4460
4462
|
*/
|
|
4461
4463
|
|
|
4462
|
-
defineJQueryPlugin(Modal);
|
|
4464
|
+
defineJQueryPlugin$1(Modal);
|
|
4463
4465
|
|
|
4464
4466
|
/**
|
|
4465
4467
|
* --------------------------------------------------------------------------
|
|
4466
|
-
* Bootstrap
|
|
4468
|
+
* Bootstrap offcanvas.js
|
|
4467
4469
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4468
4470
|
* --------------------------------------------------------------------------
|
|
4469
4471
|
*/
|
|
@@ -4622,11 +4624,11 @@
|
|
|
4622
4624
|
if (event.key !== ESCAPE_KEY) {
|
|
4623
4625
|
return;
|
|
4624
4626
|
}
|
|
4625
|
-
if (
|
|
4626
|
-
|
|
4627
|
+
if (this._config.keyboard) {
|
|
4628
|
+
this.hide();
|
|
4627
4629
|
return;
|
|
4628
4630
|
}
|
|
4629
|
-
this.
|
|
4631
|
+
EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
|
|
4630
4632
|
});
|
|
4631
4633
|
}
|
|
4632
4634
|
|
|
@@ -4650,7 +4652,7 @@
|
|
|
4650
4652
|
*/
|
|
4651
4653
|
|
|
4652
4654
|
EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
|
|
4653
|
-
const target = getElementFromSelector(this);
|
|
4655
|
+
const target = SelectorEngine.getElementFromSelector(this);
|
|
4654
4656
|
if (['A', 'AREA'].includes(this.tagName)) {
|
|
4655
4657
|
event.preventDefault();
|
|
4656
4658
|
}
|
|
@@ -4690,7 +4692,7 @@
|
|
|
4690
4692
|
* jQuery
|
|
4691
4693
|
*/
|
|
4692
4694
|
|
|
4693
|
-
defineJQueryPlugin(Offcanvas);
|
|
4695
|
+
defineJQueryPlugin$1(Offcanvas);
|
|
4694
4696
|
|
|
4695
4697
|
/**
|
|
4696
4698
|
* AccessibleToggle enhances Bootstrap Modal and Offcanvas components by:
|
|
@@ -4742,7 +4744,6 @@
|
|
|
4742
4744
|
}
|
|
4743
4745
|
}
|
|
4744
4746
|
|
|
4745
|
-
/* eslint-disable prefer-destructuring */
|
|
4746
4747
|
class AccordionToggle {
|
|
4747
4748
|
static isInitialized = false;
|
|
4748
4749
|
constructor(buttonElement) {
|
|
@@ -4783,39 +4784,13 @@
|
|
|
4783
4784
|
|
|
4784
4785
|
/**
|
|
4785
4786
|
* --------------------------------------------------------------------------
|
|
4786
|
-
* Bootstrap
|
|
4787
|
+
* Bootstrap util/sanitizer.js
|
|
4787
4788
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4788
4789
|
* --------------------------------------------------------------------------
|
|
4789
4790
|
*/
|
|
4790
4791
|
|
|
4791
|
-
|
|
4792
|
+
// js-docs-start allow-list
|
|
4792
4793
|
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
|
4793
|
-
|
|
4794
|
-
/**
|
|
4795
|
-
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
|
4796
|
-
*
|
|
4797
|
-
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
|
4798
|
-
*/
|
|
4799
|
-
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
|
|
4800
|
-
|
|
4801
|
-
/**
|
|
4802
|
-
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
|
4803
|
-
*
|
|
4804
|
-
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
|
4805
|
-
*/
|
|
4806
|
-
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
|
4807
|
-
const allowedAttribute = (attribute, allowedAttributeList) => {
|
|
4808
|
-
const attributeName = attribute.nodeName.toLowerCase();
|
|
4809
|
-
if (allowedAttributeList.includes(attributeName)) {
|
|
4810
|
-
if (uriAttributes.has(attributeName)) {
|
|
4811
|
-
return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
|
|
4812
|
-
}
|
|
4813
|
-
return true;
|
|
4814
|
-
}
|
|
4815
|
-
|
|
4816
|
-
// Check if a regular expression validates the attribute.
|
|
4817
|
-
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
|
4818
|
-
};
|
|
4819
4794
|
const DefaultAllowlist = {
|
|
4820
4795
|
// Global attributes allowed on any supplied element below.
|
|
4821
4796
|
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
|
@@ -4825,7 +4800,10 @@
|
|
|
4825
4800
|
br: [],
|
|
4826
4801
|
col: [],
|
|
4827
4802
|
code: [],
|
|
4803
|
+
dd: [],
|
|
4828
4804
|
div: [],
|
|
4805
|
+
dl: [],
|
|
4806
|
+
dt: [],
|
|
4829
4807
|
em: [],
|
|
4830
4808
|
hr: [],
|
|
4831
4809
|
h1: [],
|
|
@@ -4849,6 +4827,30 @@
|
|
|
4849
4827
|
u: [],
|
|
4850
4828
|
ul: []
|
|
4851
4829
|
};
|
|
4830
|
+
// js-docs-end allow-list
|
|
4831
|
+
|
|
4832
|
+
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
|
|
4833
|
+
|
|
4834
|
+
/**
|
|
4835
|
+
* A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
|
|
4836
|
+
* contexts.
|
|
4837
|
+
*
|
|
4838
|
+
* Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
|
|
4839
|
+
*/
|
|
4840
|
+
// eslint-disable-next-line unicorn/better-regex
|
|
4841
|
+
const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
|
|
4842
|
+
const allowedAttribute = (attribute, allowedAttributeList) => {
|
|
4843
|
+
const attributeName = attribute.nodeName.toLowerCase();
|
|
4844
|
+
if (allowedAttributeList.includes(attributeName)) {
|
|
4845
|
+
if (uriAttributes.has(attributeName)) {
|
|
4846
|
+
return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));
|
|
4847
|
+
}
|
|
4848
|
+
return true;
|
|
4849
|
+
}
|
|
4850
|
+
|
|
4851
|
+
// Check if a regular expression validates the attribute.
|
|
4852
|
+
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
|
4853
|
+
};
|
|
4852
4854
|
function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
|
4853
4855
|
if (!unsafeHtml.length) {
|
|
4854
4856
|
return unsafeHtml;
|
|
@@ -4878,7 +4880,7 @@
|
|
|
4878
4880
|
|
|
4879
4881
|
/**
|
|
4880
4882
|
* --------------------------------------------------------------------------
|
|
4881
|
-
* Bootstrap
|
|
4883
|
+
* Bootstrap util/template-factory.js
|
|
4882
4884
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4883
4885
|
* --------------------------------------------------------------------------
|
|
4884
4886
|
*/
|
|
@@ -4986,8 +4988,8 @@
|
|
|
4986
4988
|
templateElement.remove();
|
|
4987
4989
|
return;
|
|
4988
4990
|
}
|
|
4989
|
-
if (isElement$
|
|
4990
|
-
this._putElementInTemplate(getElement(content), templateElement);
|
|
4991
|
+
if (isElement$2(content)) {
|
|
4992
|
+
this._putElementInTemplate(getElement$1(content), templateElement);
|
|
4991
4993
|
return;
|
|
4992
4994
|
}
|
|
4993
4995
|
if (this._config.html) {
|
|
@@ -5000,7 +5002,7 @@
|
|
|
5000
5002
|
return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
|
|
5001
5003
|
}
|
|
5002
5004
|
_resolvePossibleFunction(arg) {
|
|
5003
|
-
return
|
|
5005
|
+
return execute(arg, [this]);
|
|
5004
5006
|
}
|
|
5005
5007
|
_putElementInTemplate(element, templateElement) {
|
|
5006
5008
|
if (this._config.html) {
|
|
@@ -5014,7 +5016,7 @@
|
|
|
5014
5016
|
|
|
5015
5017
|
/**
|
|
5016
5018
|
* --------------------------------------------------------------------------
|
|
5017
|
-
* Bootstrap
|
|
5019
|
+
* Bootstrap tooltip.js
|
|
5018
5020
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5019
5021
|
* --------------------------------------------------------------------------
|
|
5020
5022
|
*/
|
|
@@ -5062,7 +5064,7 @@
|
|
|
5062
5064
|
delay: 0,
|
|
5063
5065
|
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
|
5064
5066
|
html: false,
|
|
5065
|
-
offset: [0,
|
|
5067
|
+
offset: [0, 6],
|
|
5066
5068
|
placement: 'top',
|
|
5067
5069
|
popperConfig: null,
|
|
5068
5070
|
sanitize: true,
|
|
@@ -5175,7 +5177,7 @@
|
|
|
5175
5177
|
return;
|
|
5176
5178
|
}
|
|
5177
5179
|
|
|
5178
|
-
//
|
|
5180
|
+
// TODO: v6 remove this or make it optional
|
|
5179
5181
|
this._disposePopper();
|
|
5180
5182
|
const tip = this._getTipElement();
|
|
5181
5183
|
this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
|
|
@@ -5261,12 +5263,12 @@
|
|
|
5261
5263
|
_createTipElement(content) {
|
|
5262
5264
|
const tip = this._getTemplateFactory(content).toHtml();
|
|
5263
5265
|
|
|
5264
|
-
//
|
|
5266
|
+
// TODO: remove this check in v6
|
|
5265
5267
|
if (!tip) {
|
|
5266
5268
|
return null;
|
|
5267
5269
|
}
|
|
5268
5270
|
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
|
|
5269
|
-
//
|
|
5271
|
+
// TODO: v6 the following can be achieved with CSS only
|
|
5270
5272
|
tip.classList.add(`bs-${this.constructor.NAME}-auto`);
|
|
5271
5273
|
const tipId = getUID(this.constructor.NAME).toString();
|
|
5272
5274
|
tip.setAttribute('id', tipId);
|
|
@@ -5316,7 +5318,7 @@
|
|
|
5316
5318
|
return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);
|
|
5317
5319
|
}
|
|
5318
5320
|
_createPopper(tip) {
|
|
5319
|
-
const placement =
|
|
5321
|
+
const placement = execute(this._config.placement, [this, tip, this._element]);
|
|
5320
5322
|
const attachment = AttachmentMap[placement.toUpperCase()];
|
|
5321
5323
|
return createPopper(this._element, tip, this._getPopperConfig(attachment));
|
|
5322
5324
|
}
|
|
@@ -5333,7 +5335,7 @@
|
|
|
5333
5335
|
return offset;
|
|
5334
5336
|
}
|
|
5335
5337
|
_resolvePossibleFunction(arg) {
|
|
5336
|
-
return
|
|
5338
|
+
return execute(arg, [this._element]);
|
|
5337
5339
|
}
|
|
5338
5340
|
_getPopperConfig(attachment) {
|
|
5339
5341
|
const defaultBsPopperConfig = {
|
|
@@ -5371,7 +5373,7 @@
|
|
|
5371
5373
|
};
|
|
5372
5374
|
return {
|
|
5373
5375
|
...defaultBsPopperConfig,
|
|
5374
|
-
...(
|
|
5376
|
+
...execute(this._config.popperConfig, [defaultBsPopperConfig])
|
|
5375
5377
|
};
|
|
5376
5378
|
}
|
|
5377
5379
|
_setListeners() {
|
|
@@ -5462,7 +5464,7 @@
|
|
|
5462
5464
|
return config;
|
|
5463
5465
|
}
|
|
5464
5466
|
_configAfterMerge(config) {
|
|
5465
|
-
config.container = config.container === false ? document.body : getElement(config.container);
|
|
5467
|
+
config.container = config.container === false ? document.body : getElement$1(config.container);
|
|
5466
5468
|
if (typeof config.delay === 'number') {
|
|
5467
5469
|
config.delay = {
|
|
5468
5470
|
show: config.delay,
|
|
@@ -5479,9 +5481,9 @@
|
|
|
5479
5481
|
}
|
|
5480
5482
|
_getDelegateConfig() {
|
|
5481
5483
|
const config = {};
|
|
5482
|
-
for (const key
|
|
5483
|
-
if (this.constructor.Default[key] !==
|
|
5484
|
-
config[key] =
|
|
5484
|
+
for (const [key, value] of Object.entries(this._config)) {
|
|
5485
|
+
if (this.constructor.Default[key] !== value) {
|
|
5486
|
+
config[key] = value;
|
|
5485
5487
|
}
|
|
5486
5488
|
}
|
|
5487
5489
|
config.selector = false;
|
|
@@ -5522,11 +5524,11 @@
|
|
|
5522
5524
|
* jQuery
|
|
5523
5525
|
*/
|
|
5524
5526
|
|
|
5525
|
-
defineJQueryPlugin(Tooltip);
|
|
5527
|
+
defineJQueryPlugin$1(Tooltip);
|
|
5526
5528
|
|
|
5527
5529
|
/**
|
|
5528
5530
|
* --------------------------------------------------------------------------
|
|
5529
|
-
* Bootstrap
|
|
5531
|
+
* Bootstrap popover.js
|
|
5530
5532
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5531
5533
|
* --------------------------------------------------------------------------
|
|
5532
5534
|
*/
|
|
@@ -5603,11 +5605,11 @@
|
|
|
5603
5605
|
* jQuery
|
|
5604
5606
|
*/
|
|
5605
5607
|
|
|
5606
|
-
defineJQueryPlugin(Popover);
|
|
5608
|
+
defineJQueryPlugin$1(Popover);
|
|
5607
5609
|
|
|
5608
5610
|
/**
|
|
5609
5611
|
* --------------------------------------------------------------------------
|
|
5610
|
-
* Bootstrap
|
|
5612
|
+
* Bootstrap scrollspy.js
|
|
5611
5613
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5612
5614
|
* --------------------------------------------------------------------------
|
|
5613
5615
|
*/
|
|
@@ -5705,7 +5707,7 @@
|
|
|
5705
5707
|
// Private
|
|
5706
5708
|
_configAfterMerge(config) {
|
|
5707
5709
|
// TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
|
|
5708
|
-
config.target = getElement(config.target) || document.body;
|
|
5710
|
+
config.target = getElement$1(config.target) || document.body;
|
|
5709
5711
|
|
|
5710
5712
|
// TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
|
|
5711
5713
|
config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
|
|
@@ -5791,11 +5793,11 @@
|
|
|
5791
5793
|
if (!anchor.hash || isDisabled(anchor)) {
|
|
5792
5794
|
continue;
|
|
5793
5795
|
}
|
|
5794
|
-
const observableSection = SelectorEngine.findOne(anchor.hash, this._element);
|
|
5796
|
+
const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
|
|
5795
5797
|
|
|
5796
5798
|
// ensure that the observableSection exists & is visible
|
|
5797
5799
|
if (isVisible(observableSection)) {
|
|
5798
|
-
this._targetLinks.set(anchor.hash, anchor);
|
|
5800
|
+
this._targetLinks.set(decodeURI(anchor.hash), anchor);
|
|
5799
5801
|
this._observableSections.set(anchor.hash, observableSection);
|
|
5800
5802
|
}
|
|
5801
5803
|
}
|
|
@@ -5863,7 +5865,7 @@
|
|
|
5863
5865
|
* jQuery
|
|
5864
5866
|
*/
|
|
5865
5867
|
|
|
5866
|
-
defineJQueryPlugin(ScrollSpy$1);
|
|
5868
|
+
defineJQueryPlugin$1(ScrollSpy$1);
|
|
5867
5869
|
|
|
5868
5870
|
/**
|
|
5869
5871
|
* --------------------------------------------------------------------------
|
|
@@ -5927,6 +5929,99 @@
|
|
|
5927
5929
|
}
|
|
5928
5930
|
};
|
|
5929
5931
|
|
|
5932
|
+
/**
|
|
5933
|
+
* --------------------------------------------------------------------------
|
|
5934
|
+
* Bootstrap (v5.2.3): util/index.js
|
|
5935
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5936
|
+
* --------------------------------------------------------------------------
|
|
5937
|
+
*/
|
|
5938
|
+
|
|
5939
|
+
const getSelector = element => {
|
|
5940
|
+
let selector = element.getAttribute('data-bs-target');
|
|
5941
|
+
if (!selector || selector === '#') {
|
|
5942
|
+
let hrefAttribute = element.getAttribute('href');
|
|
5943
|
+
|
|
5944
|
+
// The only valid content that could double as a selector are IDs or classes,
|
|
5945
|
+
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
|
|
5946
|
+
// `document.querySelector` will rightfully complain it is invalid.
|
|
5947
|
+
// See https://github.com/twbs/bootstrap/issues/32273
|
|
5948
|
+
if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
|
|
5949
|
+
return null;
|
|
5950
|
+
}
|
|
5951
|
+
|
|
5952
|
+
// Just in case some CMS puts out a full URL with the anchor appended
|
|
5953
|
+
if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
|
|
5954
|
+
hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
|
|
5955
|
+
}
|
|
5956
|
+
selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
|
|
5957
|
+
}
|
|
5958
|
+
return selector;
|
|
5959
|
+
};
|
|
5960
|
+
const getSelectorFromElement = element => {
|
|
5961
|
+
const selector = getSelector(element);
|
|
5962
|
+
if (selector) {
|
|
5963
|
+
return document.querySelector(selector) ? selector : null;
|
|
5964
|
+
}
|
|
5965
|
+
return null;
|
|
5966
|
+
};
|
|
5967
|
+
const isElement = object => {
|
|
5968
|
+
if (!object || typeof object !== 'object') {
|
|
5969
|
+
return false;
|
|
5970
|
+
}
|
|
5971
|
+
if (typeof object.jquery !== 'undefined') {
|
|
5972
|
+
object = object[0];
|
|
5973
|
+
}
|
|
5974
|
+
return typeof object.nodeType !== 'undefined';
|
|
5975
|
+
};
|
|
5976
|
+
const getElement = object => {
|
|
5977
|
+
// it's a jQuery object or a node element
|
|
5978
|
+
if (isElement(object)) {
|
|
5979
|
+
return object.jquery ? object[0] : object;
|
|
5980
|
+
}
|
|
5981
|
+
if (typeof object === 'string' && object.length > 0) {
|
|
5982
|
+
return document.querySelector(object);
|
|
5983
|
+
}
|
|
5984
|
+
return null;
|
|
5985
|
+
};
|
|
5986
|
+
const getjQuery = () => {
|
|
5987
|
+
if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
5988
|
+
return window.jQuery;
|
|
5989
|
+
}
|
|
5990
|
+
return null;
|
|
5991
|
+
};
|
|
5992
|
+
const DOMContentLoadedCallbacks = [];
|
|
5993
|
+
const onDOMContentLoaded = callback => {
|
|
5994
|
+
if (document.readyState === 'loading') {
|
|
5995
|
+
// add listener on the first call when the document is in loading state
|
|
5996
|
+
if (!DOMContentLoadedCallbacks.length) {
|
|
5997
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
5998
|
+
for (const callback of DOMContentLoadedCallbacks) {
|
|
5999
|
+
callback();
|
|
6000
|
+
}
|
|
6001
|
+
});
|
|
6002
|
+
}
|
|
6003
|
+
DOMContentLoadedCallbacks.push(callback);
|
|
6004
|
+
} else {
|
|
6005
|
+
callback();
|
|
6006
|
+
}
|
|
6007
|
+
};
|
|
6008
|
+
const defineJQueryPlugin = plugin => {
|
|
6009
|
+
onDOMContentLoaded(() => {
|
|
6010
|
+
const $ = getjQuery();
|
|
6011
|
+
/* istanbul ignore if */
|
|
6012
|
+
if ($) {
|
|
6013
|
+
const name = plugin.NAME;
|
|
6014
|
+
const JQUERY_NO_CONFLICT = $.fn[name];
|
|
6015
|
+
$.fn[name] = plugin.jQueryInterface;
|
|
6016
|
+
$.fn[name].Constructor = plugin;
|
|
6017
|
+
$.fn[name].noConflict = () => {
|
|
6018
|
+
$.fn[name] = JQUERY_NO_CONFLICT;
|
|
6019
|
+
return plugin.jQueryInterface;
|
|
6020
|
+
};
|
|
6021
|
+
}
|
|
6022
|
+
});
|
|
6023
|
+
};
|
|
6024
|
+
|
|
5930
6025
|
/**
|
|
5931
6026
|
* --------------------------------------------------------------------------
|
|
5932
6027
|
* Bootstrap (v5.1.3): scrollspy.js
|
|
@@ -6136,7 +6231,7 @@
|
|
|
6136
6231
|
|
|
6137
6232
|
/**
|
|
6138
6233
|
* --------------------------------------------------------------------------
|
|
6139
|
-
* Bootstrap
|
|
6234
|
+
* Bootstrap tab.js
|
|
6140
6235
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6141
6236
|
* --------------------------------------------------------------------------
|
|
6142
6237
|
*/
|
|
@@ -6160,17 +6255,19 @@
|
|
|
6160
6255
|
const ARROW_RIGHT_KEY = 'ArrowRight';
|
|
6161
6256
|
const ARROW_UP_KEY = 'ArrowUp';
|
|
6162
6257
|
const ARROW_DOWN_KEY = 'ArrowDown';
|
|
6258
|
+
const HOME_KEY = 'Home';
|
|
6259
|
+
const END_KEY = 'End';
|
|
6163
6260
|
const CLASS_NAME_ACTIVE = 'active';
|
|
6164
6261
|
const CLASS_NAME_FADE$1 = 'fade';
|
|
6165
6262
|
const CLASS_NAME_SHOW$1 = 'show';
|
|
6166
6263
|
const CLASS_DROPDOWN = 'dropdown';
|
|
6167
6264
|
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
|
6168
6265
|
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
|
|
6169
|
-
const NOT_SELECTOR_DROPDOWN_TOGGLE =
|
|
6266
|
+
const NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`;
|
|
6170
6267
|
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
|
6171
6268
|
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
|
6172
6269
|
const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
|
|
6173
|
-
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; //
|
|
6270
|
+
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
|
|
6174
6271
|
const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
|
|
6175
6272
|
const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
|
|
6176
6273
|
|
|
@@ -6184,7 +6281,7 @@
|
|
|
6184
6281
|
this._parent = this._element.closest(SELECTOR_TAB_PANEL);
|
|
6185
6282
|
if (!this._parent) {
|
|
6186
6283
|
return;
|
|
6187
|
-
//
|
|
6284
|
+
// TODO: should throw exception in v6
|
|
6188
6285
|
// throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
|
|
6189
6286
|
}
|
|
6190
6287
|
|
|
@@ -6227,7 +6324,7 @@
|
|
|
6227
6324
|
return;
|
|
6228
6325
|
}
|
|
6229
6326
|
element.classList.add(CLASS_NAME_ACTIVE);
|
|
6230
|
-
this._activate(getElementFromSelector(element)); // Search and activate/show the proper section
|
|
6327
|
+
this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section
|
|
6231
6328
|
|
|
6232
6329
|
const complete = () => {
|
|
6233
6330
|
if (element.getAttribute('role') !== 'tab') {
|
|
@@ -6249,7 +6346,7 @@
|
|
|
6249
6346
|
}
|
|
6250
6347
|
element.classList.remove(CLASS_NAME_ACTIVE);
|
|
6251
6348
|
element.blur();
|
|
6252
|
-
this._deactivate(getElementFromSelector(element)); // Search and deactivate the shown section too
|
|
6349
|
+
this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too
|
|
6253
6350
|
|
|
6254
6351
|
const complete = () => {
|
|
6255
6352
|
if (element.getAttribute('role') !== 'tab') {
|
|
@@ -6266,13 +6363,19 @@
|
|
|
6266
6363
|
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
|
|
6267
6364
|
}
|
|
6268
6365
|
_keydown(event) {
|
|
6269
|
-
if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {
|
|
6366
|
+
if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) {
|
|
6270
6367
|
return;
|
|
6271
6368
|
}
|
|
6272
6369
|
event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
|
|
6273
6370
|
event.preventDefault();
|
|
6274
|
-
const
|
|
6275
|
-
|
|
6371
|
+
const children = this._getChildren().filter(element => !isDisabled(element));
|
|
6372
|
+
let nextActiveElement;
|
|
6373
|
+
if ([HOME_KEY, END_KEY].includes(event.key)) {
|
|
6374
|
+
nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1];
|
|
6375
|
+
} else {
|
|
6376
|
+
const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
|
|
6377
|
+
nextActiveElement = getNextActiveElement(children, event.target, isNext, true);
|
|
6378
|
+
}
|
|
6276
6379
|
if (nextActiveElement) {
|
|
6277
6380
|
nextActiveElement.focus({
|
|
6278
6381
|
preventScroll: true
|
|
@@ -6310,13 +6413,13 @@
|
|
|
6310
6413
|
this._setInitialAttributesOnTargetPanel(child);
|
|
6311
6414
|
}
|
|
6312
6415
|
_setInitialAttributesOnTargetPanel(child) {
|
|
6313
|
-
const target = getElementFromSelector(child);
|
|
6416
|
+
const target = SelectorEngine.getElementFromSelector(child);
|
|
6314
6417
|
if (!target) {
|
|
6315
6418
|
return;
|
|
6316
6419
|
}
|
|
6317
6420
|
this._setAttributeIfNotExists(target, 'role', 'tabpanel');
|
|
6318
6421
|
if (child.id) {
|
|
6319
|
-
this._setAttributeIfNotExists(target, 'aria-labelledby',
|
|
6422
|
+
this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
|
|
6320
6423
|
}
|
|
6321
6424
|
}
|
|
6322
6425
|
_toggleDropDown(element, open) {
|
|
@@ -6394,11 +6497,11 @@
|
|
|
6394
6497
|
* jQuery
|
|
6395
6498
|
*/
|
|
6396
6499
|
|
|
6397
|
-
defineJQueryPlugin(Tab);
|
|
6500
|
+
defineJQueryPlugin$1(Tab);
|
|
6398
6501
|
|
|
6399
6502
|
/**
|
|
6400
6503
|
* --------------------------------------------------------------------------
|
|
6401
|
-
* Bootstrap
|
|
6504
|
+
* Bootstrap toast.js
|
|
6402
6505
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6403
6506
|
* --------------------------------------------------------------------------
|
|
6404
6507
|
*/
|
|
@@ -6578,7 +6681,7 @@
|
|
|
6578
6681
|
* jQuery
|
|
6579
6682
|
*/
|
|
6580
6683
|
|
|
6581
|
-
defineJQueryPlugin(Toast);
|
|
6684
|
+
defineJQueryPlugin$1(Toast);
|
|
6582
6685
|
|
|
6583
6686
|
/**
|
|
6584
6687
|
* --------------------------------------------------------------------------
|