aboutsummaryrefslogtreecommitdiff
path: root/js
AgeCommit message (Collapse)AuthorFilesLines
2021-09-15Remove unneeded conditionalXhmikosR3-13/+7
2021-09-15Remove duplicate test.XhmikosR1-23/+0
2021-09-15Change test description so that it's uniqueXhmikosR1-1/+1
2021-09-15Merge duplicate test.XhmikosR1-34/+2
2021-09-15Remove commented out testXhmikosR1-16/+0
2021-09-15Skip tests if `attachShadow` is not presentXhmikosR1-22/+7
2021-09-15tests: comply to the new rulesXhmikosR12-459/+468
Use `assert.strictEqual`/`assert.true`/`assert.false`
2021-09-15Add eslint-plugin-qunitXhmikosR1-1/+2
2021-09-15Update devDependenciesXhmikosR3-2/+3
* @babel/cli ^7.14.8 → ^7.15.5 * @babel/core ^7.14.8 → ^7.15.4 * @babel/preset-env ^7.14.8 → ^7.15.6 * @rollup/plugin-commonjs ^19.0.1 → ^20.0.0 * @rollup/plugin-node-resolve ^13.0.2 → ^13.0.4 * autoprefixer ^10.3.1 → ^10.3.4 * clean-css-cli ^5.3.0 → ^5.3.3 * eslint ^7.31.0 → ^7.32.0 * eslint-config-xo ^0.37.0 → ^0.38.0 * eslint-plugin-import ^2.23.4 → ^2.24.2 * eslint-plugin-unicorn ^34.0.1 → ^36.0.0 * hugo-bin ^0.74.0 → ^0.76.1 * qunit ^2.16.0 → ^2.17.1 * postcss ^8.3.5 → ^8.3.6 * rollup ^2.53.3 → ^2.56.3 * vnu-jar 21.6.11 → 21.9.2
2021-07-25fix(modal): change the order we return from show() method (#34087)alpadev2-5/+31
In case of a modal with fading enabled, a prevented show event can cause show to not showing the modal anymore. See #34055 Co-authored-by: XhmikosR <[email protected]>
2021-04-28Backport #33634 (#33649)Carson Sievert2-1/+28
Dropdown: support `.dropdown-item` wrapped in `<li>` tags
2021-04-15Remove aria-haspopup from dropdowns (#33624)Patrick H. Lauke4-16/+16
`aria-haspopup="true"` is really intended to signal that an ARIA `menu` will be opened on activation. as a result, some assistive technologies will announce controls with `aria-haspopup="true"` as a menu or menu item (e.g. JAWS and NVDA). In addition, `aria-haspopup` seems to trigger a bug in Edge/Narrator where the `aria-expanded` state is not correctly announced at the moment when `aria-haspopup` is present. This now makes the dropdown button more like a generic disclosure widget control - see also https://www.w3.org/TR/wai-aria-practices-1.2/examples/disclosure/disclosure-navigation.html01
2021-04-05Update devDependenciesXhmikosR1-5/+3
* @babel/cli ^7.13.0 → ^7.13.14 * @babel/core ^7.13.8 → ^7.13.14 * @babel/preset-env ^7.13.9 → ^7.13.12 * @rollup/plugin-commonjs ^17.1.0 → ^18.0.0 * @rollup/plugin-node-resolve ^11.2.0 → ^11.2.1 * autoprefixer ^10.2.4 → ^10.2.5 * clean-css-cli ^5.2.0 → ^5.2.2 * eslint ^7.21.0 → ^7.23.0 * eslint-plugin-unicorn ^28.0.2 → ^29.0.0 * globby ^11.0.2 → ^11.0.3 * hugo-bin ^0.69.0 → ^0.70.0 * karma ^6.1.1 → ^6.3.2 * postcss ^8.2.6 → ^8.2.9 * qunit ^2.14.0 → ^2.14.1 * rollup ^2.40.0 → ^2.44.0 * stylelint ^13.11.0 → ^13.12.0 Also lock jQuery to v3.5.1 since 3.6.0 has a bug that affects at least our tests
2021-04-05BrowserStack: test on iPhone 12 (#33398)XhmikosR1-0/+7
2021-03-11Manual backport of #32627 (#33165)Patrick H. Lauke1-4/+4
Carousel: use buttons, not links, for prev/next controls
2021-03-02Adjust `SAFE_URL_PATTERN` regex for use with `test` method. (#33153)Nikon the Third2-1/+21
The `test` method on regexes does not behave like `match` on strings for checks if the regex matches when the global modifier (g) is present. Also adds a unit test on tooltips for sanitizing the same template twice. Co-authored-by: XhmikosR <[email protected]>
2021-02-17Partially backport #33045XhmikosR1-10/+6
Simplify karma.conf.js `customLaunchers` does not seem to be needed.
2021-01-28Switch to jsDelivr for jQuery too. (#32918)XhmikosR1-1/+3
2021-01-27Update devDependencies (#32852)XhmikosR3-12/+11
Pin karma and linkinator due to failures
2021-01-19Release v4.6.0. (#32726)v4.6.0XhmikosR39-158/+447
* Bump version to v4.6.0. * Dist
2021-01-13Update karma configXhmikosR1-28/+31
* rename constants * enforce the constants to be Boolean * use the coverage plugin only one time, on the latest jQuery run * fix karma `logLevel`
2021-01-08BrowserStack: test on macOS Catalina instead of High Sierra (#32486)XhmikosR1-3/+3
2021-01-08karma: add `v4` in Browserstack build ID (#32502)XhmikosR1-1/+1
2020-11-25Partially backport #32217 (#32225)Rohit Sharma1-5/+1
Remove unnecessary `_getCustomClass` method. `customClass` will be in the configuration already, even if it is provided in the data attributes, and jQuery's [`addClass()`](https://api.jquery.com/addclass/) method will handle it, either `this.config.customClass` is a function or a class name (even if it is a blank string). Co-authored-by: XhmikosR <[email protected]>
2020-11-24Backport #32224XhmikosR4-14/+14
Be consistent with Popper's name.
2020-11-24Backport #32178 and #32182XhmikosR1-1/+5
Handle Chromium to run Karma
2020-11-21Backport #32179 (#32220)Rohit Sharma2-31/+30
Don't hide modal when `config.keyboard` is false
2020-11-20tooltip/popover: add a `customClass` option (#31834)James Remeika3-0/+70
Co-authored-by: XhmikosR <[email protected]>
2020-11-12Check for data-interval on the first slide of carousel - v4 (#31820)Mitchell Bryson2-9/+34
When starting a cycle for a carousel, it only checks for a default interval, and not an interval defined on the slide element via data props. This adds a check in before creating the interval to move to the next slide. Co-authored-by: XhmikosR <[email protected]>
2020-11-05Backport #32045XhmikosR1-1/+1
tests: fix sanitizer test. The test template does not include a `script` tag so the test always returned true.
2020-11-01Move js/src/index.js one folder up (#32001)XhmikosR2-34/+34
2020-10-27Remove redundant visually hidden "(current)" from pagination controls (#31892)Patrick H. Lauke2-2/+2
* Replace visually hidden span with aria-current in tests * Remove redundant visually hidden "(current)" when `aria-current` already used Closes #31891
2020-10-13Prepare v4.5.3. (#31880)v4.5.3XhmikosR39-525/+555
2020-10-13Remove the unused js/dist/index.js.mapXhmikosR2-3/+1
2020-10-13Update .eslintrc.jsonXhmikosR1-30/+26
Enforce ES5 for tests
2020-10-02buttons plugin : avoid multiple change event trigger (#31000)Laussel Loïc2-4/+35
- add unit test to count how many events are thrown when widget contains multiple tags inside label - add a parameter to toggle, if click event is provided onto an input then don't trigger another change event already thrown by the browser - simplify the case where toggle interface is called click provide from input itself OR it's a button without label. If label is present, then browser propagate click event from childrens through label and then cause multiple calls to toggle - the test assumes that `.btn` class is always set onto the label if there's one, otherwise need to update this plugin and look for label around the input Test with keyboard, mouse and js click call Co-authored-by: XhmikosR <[email protected]>
2020-09-21Add parentheses around multiple spread conditionsXhmikosR6-7/+7
2020-09-21Cache a few variables.XhmikosR4-9/+12
2020-09-21Unbreak lines and remove a TODO commentXhmikosR3-10/+4
2020-09-21ensure `hidePrevented.bs.modal` can be prevented (#31696)Joakim Riedel2-1/+40
2020-09-18Dropdown: fix variable always evaluating to true (#31673)XhmikosR1-1/+1
2020-09-10Comply to the new rulesXhmikosR25-563/+584
2020-09-10Switch to xo and remove babel-eslintXhmikosR1-38/+33
2020-08-06Prepare v4.5.2. (#31444)v4.5.2XhmikosR38-62/+62
2020-08-04Prepare v4.5.1. (#31408)v4.5.1XhmikosR38-671/+169
2020-08-03Add unit test for toast to check clearTimeout to have been called (#31298)Rohit Sharma1-0/+31
2020-08-03Clear timeout before showing the toast (#31155)Rohit Sharma1-2/+8
* clear timeout before showing the toast * Add unit test * Remove the check for timeout * Check for clearTimeout to have been called Co-authored-by: XhmikosR <[email protected]> # Conflicts: # js/tests/unit/toast.spec.js
2020-07-09Update dependencies, gems and regenerate package-lock.json (#31261)XhmikosR1-2/+2
* @rollup/plugin-node-resolve 8.1.0 * popper.js 1.16.1 * qunit 2.10.1 * rollup 2.21.0
2020-07-06Backport #30326 (Unit test)ysds1-0/+17
2020-07-06Backport #30326XhmikosR1-1/+14
Prevent overflowing static backdrop modal animation TODO: backport the test too