aboutsummaryrefslogtreecommitdiff
path: root/js/src/util/index.js
AgeCommit message (Collapse)AuthorFilesLines
2024-07-19Fix `this` reference for JavaScript functions (#38725)Nathan Sarang-Walters1-1/+1
2024-03-18Fix broken comment link for reflow hack (#39791)Caleb Albritton1-1/+1
2023-03-22Remove version comment from JavaScript src files (#38294)GeoSot1-1/+1
2022-12-24Release v5.3.0-alpha1 (#37661)XhmikosR1-1/+1
* Bump version to 5.3.0-alpha1 * Dist * Add docs versions updates * Update note in homepage hero Co-authored-by: Mark Otto <[email protected]>
2022-11-22Merge branch 'main' into prepare-523XhmikosR1-48/+18
2022-11-21Bump version to 5.2.3XhmikosR1-1/+1
2022-11-12ESLint: enable prefer-template rule (#37484)XhmikosR1-1/+1
2022-11-11fix: change `replaceAll` usage introduced in #35566 (#37473)GeoSot1-1/+1
2022-11-07Properly escape IDs in getSelector() to handle weird IDs (#35565) (#35566)Pierre Souchay1-1/+16
2022-11-06Move `getElementFromSelector` & `getSelectorFromElement` to SelectorEngine ↵GeoSot1-43/+0
(#36027) * Move `getElementFromSelector` & getSelectorFromElement` inside selector-engine.js, in order to use SelectorEngine methods, avoiding raw querySelector usage * add `getMultipleElementsFromSelector` helper Co-authored-by: Julien Déramond <[email protected]>
2022-10-07Boost `execute` function, being able to handle arguments (#36652)GeoSot1-4/+2
2022-10-03Release v5.2.2 (#37236)XhmikosR1-1/+1
* Bump version to v5.2.2 * Dist
2022-09-07Release v5.2.1 (#37098)XhmikosR1-1/+1
* Bump version to v5.2.1. * Dist
2022-07-19Release v5.2.0 (#36768)XhmikosR1-1/+1
* Bump version to 5.2.0 * Dist * Update masthead.html
2022-07-18Fix typos in code (#36763)Marc Wrobel1-1/+1
Shoutout is correct but has been replaced by its more common form : Shout-out (https://www.merriam-webster.com/dictionary/shout-out).
2022-05-13Prepare v5.2.0-beta1Mark Otto1-1/+1
2022-01-13Fix: `isVisible` function behavior in case of a `<details>` element, on ↵Ryan Berliner1-1/+20
chrome 97 (#35682)
2021-12-10Extract Component config functionality to a separate class (#33872)GeoSot1-15/+1
Co-authored-by: XhmikosR <[email protected]>
2021-12-10util/index.js: minor refactoring (#35510)XhmikosR1-27/+25
* rename variables * remove an unused variable * be more explicit * reuse variable
2021-10-13JS: minor refactoring (#35183)XhmikosR1-19/+17
* add missing comments * shorten block comments * reorder constants * reorder public/private methods * sort exports alphabetically in util/index.js * fix a couple of typos
2021-10-09Merge remote-tracking branch 'remotes/origin/v513'XhmikosR1-1/+1
2021-10-09Bump version to 5.1.3.XhmikosR1-1/+1
2021-10-05Enable `unicorn/numeric-separators-style` rule.XhmikosR1-1/+1
This is taken care of by babel via @babel/plugin-proposal-numeric-separator
2021-10-05Enable `unicorn/no-array-for-each` ruleXhmikosR1-3/+5
2021-10-05Enable `unicorn/prefer-prototype-methods` ruleXhmikosR1-1/+1
2021-10-05Release v5.1.2 (#35114)XhmikosR1-1/+1
2021-09-07Release v5.1.1 (#34869)v5.1.1XhmikosR1-1/+1
* Prepare v5.1.1. * Dist
2021-08-04Prepare v5.1.0. (#34674)v5.1.0XhmikosR1-1/+1
2021-07-21Remove whitespace at beginning of util/index.js (#34545)Ryan Berliner1-1/+0
2021-07-20Fix `Util.reflow` function and add documentation (#34543)GeoSot1-1/+12
* add documentation to reflow function * refactor to void as it should be Co-authored-by: XhmikosR <[email protected]>
2021-07-14util.js: remove `Selector.findOne()` dependency (#34441)GeoSot1-2/+1
Co-authored-by: XhmikosR <[email protected]>
2021-06-22Release v5.0.2 (#34276)v5.0.2XhmikosR1-1/+1
* Bump version to v5.0.2. * Dist
2021-06-22Register only one `DOMContentLoaded` event listener in `onDOMContentLoaded` ↵alpadev1-1/+10
(#34158) * refactor: reuse one DOMContentLoaded event listener in onDOMContentLoaded function Instead of adding an event listener everytime the utility function is called, cache the callbacks and execute them all at once. * refactor: drop iife for onDOMContentLoaded Co-authored-by: XhmikosR <[email protected]>
2021-06-03Fix handling of transitionend events dispatched by nested elements(#33845)alpadev1-20/+31
Fix handling of transitionend events dispatched by nested elements Properly handle events from nested elements Change `emulateTransitionEnd` to `executeAfterTransition` &&
2021-05-22Automatically select an item in the dropdown when using arrow keys (#34052)alpadev1-2/+2
2021-05-20Refactor `isVisible` helper, fixing false positives from deep nesting or ↵Ryan Berliner1-11/+2
alternate means (#33960)
2021-05-19Add `getNextActiveElement` helper function to utils, replacing custom ↵GeoSot1-0/+29
implementation through components (#33608)
2021-05-13Release v5.0.1 (#33972)v5.0.1XhmikosR1-1/+1
* Bump version to 5.0.1. * Dist
2021-05-13Move get element functionality to a helper (#33327)GeoSot1-1/+26
Looking around on js components I found out many checks, different expressed but with same purpose. Some of them are trying to parse string to element, others, jQuery element to js simple nodeElement etc With this Pr, I am trying to give a standard way to parse an element So this pr: * Creates `getElement` helper that tries to parse an argument to element or null * Changes `isElement` to make explicit checks and return Boolean * fixes tests deficiencies
2021-05-11Extract static `DATA_KEY` & `EVENT_KEY` to base-component (#33635)GeoSot1-1/+2
* Force each plugin that extends base-components to implement a static method `NAME()` * Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
2021-05-05Release v5.0.0 (#33647)v5.0.0XhmikosR1-1/+1
* Bump version to 5.0.0 * Fix npm tag * Dist
2021-04-14Decouple BackDrop from modal (#32439)GeoSot1-1/+8
* Create backdrop.js util * revert breaking changes remove PromiseTimout usage revert class name * one more test | change bundlewatch.config * add config obj to backdrop helper | tests for rootElement | use transitionend helper * Minor tweaks — Renaming Co-authored-by: Rohit Sharma <[email protected]>
2021-04-11Use cached `noop` function everywhereRohit Sharma1-1/+1
2021-03-30Use template literals instead of concatenation (#33497)Rohit Sharma1-4/+2
2021-03-23Release v5.0.0-beta3 (#33439)v5.0.0-beta3XhmikosR1-1/+1
2021-03-17Use more safe check for 'isDisabled' helper (#33385)GeoSot1-1/+1
2021-03-16Accept data-bs-body option in the configuration object as well (#33248)GeoSot1-0/+17
* Accept data-bs-body option in the configuration object as well Tweak jqueryInterface, add some more tests * Fix Markdown table formatting and tweak the wording on backdrop Co-authored-by: Mark Otto <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2021-02-16util: change `isRTL` to a function (#32446)XhmikosR1-1/+1
This allows the bundler to tree-shake the function.
2021-02-10Release v5.0.0-beta2 (#32467)v5.0.0-beta2XhmikosR1-1/+1
* Bump version to 5.0.0-beta2 * Dist
2021-02-03Prevent `getSelector` from returning URLs as selector (#32586)Florian Vick1-1/+14
* added checks to getSelector in util to prevent returning hrefs that are invalid selectors * restored compatibility for the class selector and added test cases for keeping urls from being returned as a selector Co-authored-by: XhmikosR <[email protected]>