aboutsummaryrefslogtreecommitdiff
path: root/js/src/collapse.js
AgeCommit message (Collapse)AuthorFilesLines
2021-08-04Prepare v5.1.0. (#34674)v5.1.0XhmikosR1-1/+1
2021-07-29transfer `interface` inside `jQueryInterface`GeoSot1-18/+14
2021-07-29simplify initialization on `data-toggle` clickGeoSot1-6/+1
2021-07-29keep parent only as elementGeoSot1-15/+13
2021-07-29remove duplicated `Selector.find`GeoSot1-4/+1
2021-07-29Simplify check for childrenGeoSot1-8/+2
2021-07-29initialize variable properlyGeoSot1-16/+10
2021-07-29Refactor internal function to use it in more cases.GeoSot1-25/+13
Also, remove a few redundant checks since we already check for it in `_addAriaAndCollapsedClass()`.
2021-07-29Add a helper function to check for showingGeoSot1-12/+12
Also, remove the `isTransitioning()` helper.
2021-07-29Remove redundant check on `data-toggle` click.GeoSot1-12/+2
Previously, it was assumed that the trigger element would have its own separate config than the collapse element itself.
2021-07-29streamline `_getConfig` & interfaceGeoSot1-11/+4
2021-07-05Add horizontal collapse supportMark Otto1-1/+2
2021-06-22Release v5.0.2 (#34276)v5.0.2XhmikosR1-1/+1
* Bump version to v5.0.2. * Dist
2021-06-03Add `getOrCreateInstance` method in base-component (#33276)GeoSot1-3/+3
Co-authored-by: Rohit Sharma <[email protected]> Co-authored-by: XhmikosR <[email protected]>
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-9/+2
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-3/+3
* Force each plugin that extends base-components to implement a static method `NAME()` * Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
2021-05-11Refactor: move disposing properties into the base class (#33740)GeoSot1-8/+0
Moves more functionality to `base-component`, transferring the responsibility of disposal to parent class. Each component, dusting disposal, sets its protected properties to `null`. So the same can be done in one place for all children components .
2021-05-10Merge js-components 'transitionend' listener callbacks into one methodGeoSot1-9/+2
2021-05-05Release v5.0.0 (#33647)v5.0.0XhmikosR1-1/+1
* Bump version to 5.0.0 * Fix npm tag * Dist
2021-03-23Release v5.0.0-beta3 (#33439)v5.0.0-beta3XhmikosR1-1/+1
2021-03-02refactor: use a Map instead of an Object in dom/data (#32180)alpadev1-4/+4
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-22Allow constructors to accept a CSS selector (#32245)Rohit Sharma1-3/+3
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-10Release v5.0.0-beta2 (#32467)v5.0.0-beta2XhmikosR1-1/+1
* Bump version to 5.0.0-beta2 * Dist
2020-12-21collapse: prevent url change if `A` nested tag is clicked (#32438)Daniele Faraglia1-1/+1
Co-authored-by: XhmikosR <[email protected]>
2020-12-10Remove `TRANSITION_END` from utils (#32394)XhmikosR1-3/+2
2020-12-08Refactor components to use a utility function to define jQuery plugins (#32285)alpadev1-15/+2
* 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-02Unbreak lines. (#32304)XhmikosR1-4/+2
2020-11-29Remove setData from construtors (#32264)Rohit Sharma1-2/+0
2020-11-29Move `VERSION` to BaseComponent (#32254)Rohit Sharma1-5/+0
2020-11-29add dispose in base componentJohann-S1-3/+1
2020-11-29create a base componentJohann-S1-6/+8
2020-11-14Use `Array.find` instead of `Array.filter`XhmikosR1-2/+2
2020-11-14Add `bs` in data attributesRohit Sharma1-4/+4
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-11Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3XhmikosR1-2/+2
2020-11-01Streamline jQuery comment. (#32016)XhmikosR1-1/+1
2020-11-01Fix TypeError when Bootstrap is included in `head` (#32024)Sascha1-11/+14
* 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-2/+2
2020-07-12Add parentheses around multiple spread conditionsXhmikosR1-1/+1
2020-06-17collapse.js: return early.XhmikosR1-13/+13
2020-06-17Remove a couple of variables used onceXhmikosR1-2/+1
2020-06-16Rename "master" to "main". (#31050)XhmikosR1-1/+1
2020-05-13Bump version to 5.0.0-alpha1 (#29925)XhmikosR1-2/+2
Also add v4.5.0 in versions and keep README.md pointing to v4.5.0 so that there are no broken stuff.
2020-04-17collapse: don't rely on implicit conversion (#30566)XhmikosR1-1/+1
`config` can be an `Object` and we only need to test for `hide` or `show` if it's a `String`
2020-04-09Pass multiple classes to `classList.add` / `classList.remove` (#30537)XhmikosR1-4/+2
This is supported by our currently supported browsers.
2020-03-25fix: remove make array util function (#30430)Johann-S1-8/+8
2020-03-18Switch to strings constants.XhmikosR1-53/+45
This allows the minifier to mangle the constants. It also allows the linter to find unused strings properly. While at it, remove a few unused properties. File Before After Diff -------------------------------------------------------- bootstrap.bundle.min.js 23.61 kB 22.61 kB -1.00 kB (-4.23 %) bootstrap.min.js 17.04 kB 16.08 kB -0.96 kB (-5.63 %)
2020-03-09Improvement: harmonize usage of constants (#30285)Sparks1-3/+3
2019-10-03return to the original file structure to avoid breaking modularityJohann-S1-0/+441