aboutsummaryrefslogtreecommitdiff
path: root/js/src/tooltip.js
AgeCommit message (Collapse)AuthorFilesLines
2021-09-11Extract Config functionalityGeoSot1-5/+7
2021-09-07Release v5.1.1 (#34869)v5.1.1XhmikosR1-1/+1
* Prepare v5.1.1. * Dist
2021-08-31Fix tooltip `data-bs-original-title` issue (#34842)GeoSot1-8/+17
2021-08-04Prepare v5.1.0. (#34674)v5.1.0XhmikosR1-1/+1
2021-08-03Regression on tooltip template creation process. (#34628)GeoSot1-5/+4
* Regression on tooltip template creation process. * check if template content does not exist, or given argument is empty * call `setContent()` once.
2021-07-30tooltip: move repeated strings to constants (#34619)XhmikosR1-2/+5
2021-07-30Enable a few eslint-config-xo rules (#34620)XhmikosR1-2/+2
* unicorn/prefer-dom-node-append * unicorn/prefer-dom-node-remove
2021-07-22Use on private method to set content & cleanup templateGeoSot1-2/+12
2021-07-22popover: Move common code in tooltip's `getTipElement()`GeoSot1-1/+4
2021-07-22use one private method to resolve string or functionGeoSot1-13/+8
2021-07-22Use `getOrCreateInstance` on `_initializeOnDelegatedTarget`GeoSot1-9/+1
2021-07-22`_getDelegateConfig()`: add a comment and remove an unneeded config checkGeoSot1-5/+6
2021-07-22use a class private getter to decouple same methods usageGeoSot1-3/+7
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-6/+1
Co-authored-by: Rohit Sharma <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2021-05-25Change `element.parentNode.removeChild(element)` to `element.remove()` (#34071)GeoSot1-4/+4
2021-05-20Allow use of `dispose/hide` methods on Tooltip & Popover from ↵GeoSot1-4/+0
jQueryInterface, when component does not exists. (#33371)
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-21/+6
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-12Popover/Tooltip: streamline config property to start with underscore (#33381)GeoSot1-37/+37
2021-05-11Extract static `DATA_KEY` & `EVENT_KEY` to base-component (#33635)GeoSot1-9/+1
* 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-7/+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-18/+4
2021-05-05Release v5.0.0 (#33647)v5.0.0XhmikosR1-1/+1
* Bump version to 5.0.0 * Fix npm tag * Dist
2021-04-19Don't change the value for `altBoundary` option (#33684)Rohit Sharma1-1/+0
- Since bootstrap is not changing the default value of `elementContext` option, changing the value of `altBoundary` option is not needed for any modifier in real Co-authored-by: XhmikosR <[email protected]>
2021-04-11Remove element event listeners through base component (#33429)GeoSot1-1/+0
After some research, I found out that EventHandler saves all the custom events per element using namespace, and is capable of removing handlers using only the element and its namespace (`DATA_KEY`). So, probably is better to utilize the base-component to do the same job.
2021-04-11Use cached `noop` function everywhereRohit Sharma1-1/+1
2021-03-23Release v5.0.0-beta3 (#33439)v5.0.0-beta3XhmikosR1-1/+1
2021-03-16only trigger tooltip inserted event on true dom insertRyan Berliner1-2/+1
2021-03-16reuse existing popper on show during tooltip fadeoutRyan Berliner1-3/+3
2021-03-16prevent quick interactions from misplacing tooltipsRyan Berliner1-1/+5
2021-03-16prevent tooltip from being deleted on quick re-activationsRyan Berliner1-0/+4
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-16util: change `isRTL` to a function (#32446)XhmikosR1-4/+3
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-09Add function type for `popperConfig` option (#32882)Rohit Sharma1-4/+4
* Add function type for `popperConfig` option * Update .bundlewatch.config.json * copy edits Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-04Fix Popper preventOverflow boundary config (#32845)Kyle Tsang1-1/+1
Currently, the boundary config is being assigned to the wrong var (`rootBoundary`) in the popper config. It should be assigned to the `boundary` var in popper's config. Ref: https://popper.js.org/docs/v2/utils/detect-overflow/#boundary
2021-01-28Restore `offset` option for tooltip/popover componentsRohit Sharma1-0/+22
2021-01-27Tooltip refactoring (#32523)GeoSot1-84/+74
* tooltip: move common code to a reusable function * tooltip: return early in `show()` Co-authored-by: Rohit Sharma <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2020-12-14Tooltip/popover - change the default value for `fallbackPlacements` (#32437)Rohit Sharma1-15/+9
The default Popper `fallbackPlacements` value is `[oppositePlacement]`. - The default value was previously (in v4) `'flip'` that can be achieved by passing the single value in the array, like — `[oppositePlacement]`. Keeping `null` also sets the `fallbackPlacements` to `[oppositePlacement]` (Default value in Popper) - It's better to have **clockwise** (`['top', 'right', 'bottom', 'left']`) fallback options so that tooltip/popover can be placed to another side even if the opposite placement doesn't fit. Co-authored-by: XhmikosR <[email protected]>
2020-12-10Tooltip - check if tip and its parent node exist in dispose method (#32420)Rohit Sharma1-1/+1
2020-12-10Remove `TRANSITION_END` from utils (#32394)XhmikosR1-3/+2
2020-12-09Add fallback behaviourMartijn Cuppens1-1/+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-06Update to popper.js v2.xJohann-S1-59/+50
2020-12-04feat(RTL): implement RTLGaël Poupard1-3/+16
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-02Unbreak lines. (#32304)XhmikosR1-26/+9
2020-11-30tooltip.js: reuse existent variableXhmikosR1-2/+2
2020-11-30Extra check for existence of any `aria-label`Patrick H. Lauke1-2/+2
before overwriting it...