aboutsummaryrefslogtreecommitdiff
path: root/js/src/util/index.js
AgeCommit message (Collapse)AuthorFilesLines
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]>
2021-01-13Throw a `TypeError` instead of the generic `Error` (#32585)Rohit Sharma1-5/+4
* Change from Error to TypeError * Convert the `NAME` to upper case to make the consistency in the error message * Update the remaining tests to be stricter Co-authored-by: XhmikosR <[email protected]>
2020-12-10Remove `TRANSITION_END` from utils (#32394)XhmikosR1-1/+0
2020-12-08Refactor components to use a utility function to define jQuery plugins (#32285)alpadev1-1/+18
* refactor: use an utility function to define jQuery plugins * test: add spec for defineJQueryPlugin utility function * Update .bundlewatch.config.json Co-authored-by: XhmikosR <[email protected]>
2020-12-07Prepare v5.0.0-beta1.XhmikosR1-1/+1
2020-12-04feat(RTL): implement RTLGaël Poupard1-1/+4
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-02Unbreak lines. (#32304)XhmikosR1-4/+2
2020-11-14Switch to Number propertiesXhmikosR1-3/+3
2020-11-14Add `bs` in data attributesRohit Sharma1-2/+2
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-11Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3XhmikosR1-1/+1
2020-11-01Fix TypeError when Bootstrap is included in `head` (#32024)Sascha1-2/+11
* extend jquery after domContentLoaded event is fired * add unittest for util onDOMContentLoaded * wait for trigger jquery event after domContentLoaded * remove domcontentready from eventHandler * move istanbul ignore statements to correct line Co-authored-by: XhmikosR <[email protected]>
2020-09-29Prepare v5.0.0-alpha2. (#31748)v5.0.0-alpha2XhmikosR1-1/+1
2020-06-17Unbreak short linesXhmikosR1-15/+14
2020-06-16Rename "master" to "main". (#31050)XhmikosR1-1/+1
2020-05-14Replace double tilde with `Math.floor` (#30691)XhmikosR1-1/+1
Nowadays, browser engines have improved a lot and `Math.floor` is the same, if not faster. Also, clarity is better than micro-optimizations in this case.
2020-05-13Bump version to 5.0.0-alpha1 (#29925)XhmikosR1-1/+1
Also add v4.5.0 in versions and keep README.md pointing to v4.5.0 so that there are no broken stuff.
2020-03-25fix: remove make array util function (#30430)Johann-S1-9/+0
2020-03-18Remove IE compatibility JS codeJohann-S1-4/+1
2020-03-18fix: ensure `totype` always returns stringified null/undefined when ↵Johann-S1-1/+7
null/undefined is passed (#30383)
2019-10-17Skip hidden dropdowns while focusing (#29523)Jeremy Jackson1-3/+6
2019-09-02ESLint: specify `--report-unused-disable-directives` (#29350)XhmikosR1-2/+0
2019-08-02add a way to disable jQuery detectionJohann-S1-2/+11
2019-07-24use get selector from element only when neededJohann-S1-5/+18
2019-03-18Add back support for IE 11Johann-S1-1/+4
2019-03-11Comply to the new rules.XhmikosR1-16/+18
2019-02-26move util in a util folder with the sanitizerJohann-S1-0/+177