Commit Graph

220 Commits

Author SHA1 Message Date
GeoSot c69ccba08c Tooltip: Change `_enter` & `_leave` to work without arguments 2021-12-01 18:00:36 +02:00
GeoSot a20e4203fe Tooltip: Remove redundant `config.delay` check
`config.delay` is always an object after initialization
2021-12-01 18:00:36 +02:00
GeoSot 724663b3cd Tooltip: Remove `Data.set` usage for dynamically created tip
This is not used any further, so we were just setting it.
2021-12-01 18:00:36 +02:00
GeoSot 3baeb0a5c1 Tooltip: merge `isAnimated` checks 2021-12-01 18:00:36 +02:00
GeoSot 53c77c0203 Tooltip: refactor jQueryInterface 2021-12-01 18:00:36 +02:00
GeoSot cab62af2e6
Fix popover arrow & tooltip template after the `setContent` addition (#35441) 2021-12-01 15:10:10 +02:00
GeoSot 44a6cd724c
Tooltip: remove leftover method (#35440)
Remove a leftover after #32692

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-01 14:53:56 +02:00
GeoSot 6f077ff7bc
Clean tooltip component unneeded functionality (#32692) 2021-11-25 20:08:11 +02:00
GeoSot 374eeecfbc
tooltip.js: use array.includes instead of for iteration (#35127) 2021-11-25 19:39:13 +02:00
GeoSot 94a596fbcb
Add a template factory helper to handle all template cases (#34519)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-11-25 19:14:02 +02:00
XhmikosR e8f702666f
JS: minor refactoring (#35183)
* 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-13 15:19:28 +03:00
XhmikosR 24e3ca2474
tooltip.js: ignore a LGTM error (#35147)
The code on this line is either sanitized or the user chose to not sanitize it.
2021-10-10 14:49:41 +03:00
XhmikosR c44d64ed71 Merge remote-tracking branch 'remotes/origin/v513' 2021-10-09 18:28:28 +03:00
XhmikosR 1a6fdfae6b Bump version to 5.1.3. 2021-10-09 09:43:19 +03:00
XhmikosR 666fe596bf Enable `unicorn/no-array-for-each` rule 2021-10-05 19:52:11 +03:00
XhmikosR 5ecef8ac01
Release v5.1.2 (#35114) 2021-10-05 18:50:18 +03:00
XhmikosR 0d81d3cbc1
Release v5.1.1 (#34869)
* Prepare v5.1.1.

* Dist
2021-09-07 18:37:44 +03:00
GeoSot 51afe026ca
Fix tooltip `data-bs-original-title` issue (#34842) 2021-08-31 16:11:22 +03:00
XhmikosR f20fece3a8
Prepare v5.1.0. (#34674) 2021-08-04 18:41:51 +03:00
GeoSot a6a2d1e2df
Regression on tooltip template creation process. (#34628)
* Regression on tooltip template creation process.

* check if template content does not exist, or given argument is empty

* call `setContent()` once.
2021-08-03 11:59:33 +03:00
XhmikosR 742269a734
tooltip: move repeated strings to constants (#34619) 2021-07-30 00:32:07 +02:00
XhmikosR 6d707f4801
Enable a few eslint-config-xo rules (#34620)
* unicorn/prefer-dom-node-append
* unicorn/prefer-dom-node-remove
2021-07-30 00:23:00 +02:00
GeoSot da2db218ed Use on private method to set content & cleanup template 2021-07-22 17:20:38 +03:00
GeoSot 9c3ceaa25b popover: Move common code in tooltip's `getTipElement()` 2021-07-22 17:20:38 +03:00
GeoSot a97fd1cd24 use one private method to resolve string or function 2021-07-22 17:20:38 +03:00
GeoSot 3716603dbc Use `getOrCreateInstance` on `_initializeOnDelegatedTarget` 2021-07-22 17:20:38 +03:00
GeoSot 92c7056619 `_getDelegateConfig()`: add a comment and remove an unneeded config check 2021-07-22 17:20:38 +03:00
GeoSot c4e189df40 use a class private getter to decouple same methods usage 2021-07-22 17:20:38 +03:00
XhmikosR 688bce4fa6
Release v5.0.2 (#34276)
* Bump version to v5.0.2.

* Dist
2021-06-22 21:29:16 +03:00
GeoSot c98657b830
Add `getOrCreateInstance` method in base-component (#33276)
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-06-03 18:53:27 +03:00
GeoSot 544d9ac3cf
Change `element.parentNode.removeChild(element)` to `element.remove()` (#34071) 2021-05-25 18:30:38 +03:00
GeoSot 9e4f87ae8f
Allow use of `dispose/hide` methods on Tooltip & Popover from jQueryInterface, when component does not exists. (#33371) 2021-05-20 16:16:55 +03:00
XhmikosR 58b1be927f
Release v5.0.1 (#33972)
* Bump version to 5.0.1.

* Dist
2021-05-13 19:22:20 +03:00
GeoSot 6e1c9096f0
Move get element functionality to a helper (#33327)
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-13 18:17:20 +03:00
GeoSot 9a9e22475c
Popover/Tooltip: streamline config property to start with underscore (#33381) 2021-05-12 12:15:59 +03:00
GeoSot 9fe36edf68
Extract static `DATA_KEY` & `EVENT_KEY` to base-component (#33635)
* Force each plugin that extends base-components to implement a static method `NAME()`
* Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
2021-05-11 10:49:30 +03:00
GeoSot 03842b5f25
Refactor: move disposing properties into the base class (#33740)
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-11 09:04:42 +03:00
GeoSot 90b1a6907e Merge js-components 'transitionend' listener callbacks into one method 2021-05-10 13:59:55 -07:00
XhmikosR bf09367486
Release v5.0.0 (#33647)
* Bump version to 5.0.0

* Fix npm tag

* Dist
2021-05-05 22:32:12 +03:00
Rohit Sharma a22f4d3cfd
Don't change the value for `altBoundary` option (#33684)
- 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 <xhmikosr@gmail.com>
2021-04-19 19:58:45 +03:00
GeoSot 566451230f
Remove element event listeners through base component (#33429)
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-11 09:54:48 +03:00
Rohit Sharma b2bc159d72 Use cached `noop` function everywhere 2021-04-11 09:42:52 +03:00
XhmikosR 220139a89f
Release v5.0.0-beta3 (#33439) 2021-03-23 18:26:54 +02:00
Ryan Berliner 99b2c0b390 only trigger tooltip inserted event on true dom insert 2021-03-16 07:48:50 +02:00
Ryan Berliner 72d2313579 reuse existing popper on show during tooltip fadeout 2021-03-16 07:48:50 +02:00
Ryan Berliner 6ef70b342c prevent quick interactions from misplacing tooltips 2021-03-16 07:48:50 +02:00
Ryan Berliner d491c29aa0 prevent tooltip from being deleted on quick re-activations 2021-03-16 07:48:50 +02:00
alpadev 48a95f7280
refactor: use a Map instead of an Object in dom/data (#32180)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
2021-03-02 16:55:44 +02:00
XhmikosR 92434fa30f
util: change `isRTL` to a function (#32446)
This allows the bundler to tree-shake the function.
2021-02-16 10:14:05 +02:00
XhmikosR e50c11b8c6
Release v5.0.0-beta2 (#32467)
* Bump version to 5.0.0-beta2

* Dist
2021-02-10 18:14:51 +02:00