Skip to content

Commit 2bbfc7c

Browse files
authored
Merge pull request #799 from ReactTooltip/chore/dependencies-upgrade
chore: dependencies upgrade
2 parents f9e513e + ebea5b9 commit 2bbfc7c

File tree

7 files changed

+929
-330
lines changed

7 files changed

+929
-330
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ jobs:
2828
run: |
2929
yarn build
3030
yarn run semantic-release
31+
yarn gh-pages

CHANGELOG.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# [4.3.0](https://github.com/wwayne/react-tooltip/compare/v4.2.21...v4.3.0) (2022-10-13)
1+
# [4.3.0](https://github.com/wwayne/react-tooltip/compare/v4.2.21...v4.3.0) (2022-10-12)
22

33
### Bug Fixes
44

5-
- [#759](https://github.com/wwayne/react-tooltip/issues/759) - Disable tooltip when disable prop changes ([8e9cca0](https://github.com/wwayne/react-tooltip/commit/8e9cca016f8eb59036c0c4623b85bf3f465ba262))
6-
- **aftershow:** call afterShow only after state has fully updated ([54752e8](https://github.com/wwayne/react-tooltip/commit/54752e81093f4c41bae1b49f7de65f28cf54df1a))
7-
- effect and type not properly applied at first render ([a8d0e51](https://github.com/wwayne/react-tooltip/commit/a8d0e51dd5dc0eb85d985232da90d54fd031ae4b))
8-
- **getposition:** no error when all placements outside ([249b925](https://github.com/wwayne/react-tooltip/commit/249b925a30ac2e7f04648a20bc9976e85358205b))
9-
- performance issue caused by excessive use of clearTimeout/Interval ([22aea50](https://github.com/wwayne/react-tooltip/commit/22aea5086db47727feae609bb7a6f8e269b7f2de))
10-
- **react18:** tip not hiding with React 18 StrictMode enabled ([83b72c6](https://github.com/wwayne/react-tooltip/commit/83b72c63ea9fe527bcbfb0b85414527e172c970b))
11-
- set aria-describedby value wrong when custom id ([a04d26c](https://github.com/wwayne/react-tooltip/commit/a04d26cc0639054b474ca8b373c95a09b199973a))
5+
- #759 (https://github.com/wwayne/react-tooltip/issues/759) - Disable tooltip when disable prop changes (8e9cca0 (https://github.com/wwayne/react-tooltip/commit/8e9cca016f8eb59036c0c4623b85bf3f465ba262))
6+
- \*aftershow: call afterShow only after state has fully updated (54752e8 (https://github.com/wwayne/react-tooltip/commit/54752e81093f4c41bae1b49f7de65f28cf54df1a))
7+
- effect and type not properly applied at first render (a8d0e51 (https://github.com/wwayne/react-tooltip/commit/a8d0e51dd5dc0eb85d985232da90d54fd031ae4b))
8+
- getposition: no error when all placements outside (249b925 (https://github.com/wwayne/react-tooltip/commit/249b925a30ac2e7f04648a20bc9976e85358205b))
9+
- performance issue caused by excessive use of clearTimeout/Interval (22aea50 (https://github.com/wwayne/react-tooltip/commit/22aea5086db47727feae609bb7a6f8e269b7f2de))
10+
- **react18: tip not hiding with React 18 StrictMode enabled** (83b72c6 (https://github.com/wwayne/react-tooltip/commit/83b72c63ea9fe527bcbfb0b85414527e172c970b))
11+
- set aria-describedby value wrong when custom id (a04d26c (https://github.com/wwayne/react-tooltip/commit/a04d26cc0639054b474ca8b373c95a09b199973a))
1212

1313
### Features
1414

15-
- **component:** adding "padding" property to customize padding style ([9ae765a](https://github.com/wwayne/react-tooltip/commit/9ae765a3cc38b36ce5ea77edd8fcc0f7bd9646a6))
16-
- **getposition:** support desired-place-list (by priority) ([982d89d](https://github.com/wwayne/react-tooltip/commit/982d89d2b9d663ed92d41743f63069d0c8a4aac0))
17-
- **parent_body_mode:** [#535](https://github.com/wwayne/react-tooltip/issues/535) search parents for data-tip if in body mode ([71da348](https://github.com/wwayne/react-tooltip/commit/71da34870163c4377a82b009ac63692e34eeb444))
18-
- **pencil:** readme updated to trigger next minor release (react 18 support release) ([bb9c79e](https://github.com/wwayne/react-tooltip/commit/bb9c79e248918e4b0641b9305752e59019a60a72))
19-
- **pencil:** readme updated to trigger next minor release (react 18 support release) ([3a6ec6c](https://github.com/wwayne/react-tooltip/commit/3a6ec6c1a1c61434532a9350e7ceafe17e8794b9))
15+
- component: adding "padding" property to customize padding style (9ae765a (https://github.com/wwayne/react-tooltip/commit/9ae765a3cc38b36ce5ea77edd8fcc0f7bd9646a6))
16+
- getposition: support desired-place-list (by priority) (982d89d (https://github.com/wwayne/react-tooltip/commit/982d89d2b9d663ed92d41743f63069d0c8a4aac0))
17+
- parent_body_mode: #535 (https://github.com/wwayne/react-tooltip/issues/535) search parents for data-tip if in body mode (71da348 (https://github.com/wwayne/react-tooltip/commit/71da34870163c4377a82b009ac63692e34eeb444))
18+
- pencil: readme updated to trigger next minor release (react 18 support release) (bb9c79e (https://github.com/wwayne/react-tooltip/commit/bb9c79e248918e4b0641b9305752e59019a60a72))
19+
- pencil: readme updated to trigger next minor release (react 18 support release) (3a6ec6c (https://github.com/wwayne/react-tooltip/commit/3a6ec6c1a1c61434532a9350e7ceafe17e8794b9))
2020

2121
# [4.2.21](https://github.com/wwayne/react-tooltip/compare/v4.2.20...v4.2.21) (2021-05-28)
2222

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
[![Edit ReactTooltip](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/heuristic-curran-bddeu?fontsize=14&hidenavigation=1&theme=dark)
1515

16-
Or see it on [Github Page](https://wwayne.github.io/react-tooltip).
16+
Or see it on [Github Page](https://reacttooltip.github.io/react-tooltip/).
1717

1818
## Installation
1919

@@ -226,9 +226,11 @@ return(
226226

227227
[alexgurr](https://github.com/alexgurr) Casual maintainer - accepting PRs and doing minor testing/development.
228228

229+
[pdeszynski](https://github.com/pdeszynski) Casual maintainer - accepting PRs and doing minor testing/development.
230+
229231
[aronhelser](https://github.com/aronhelser) Passive maintainer - accepting PRs and doing minor testing, but not fixing issues or doing active development.
230232

231-
[roggervalf](https://github.com/roggervalf) inactive maintainer - no longer seems to be doing development.
233+
[roggervalf](https://github.com/roggervalf) (inactive).
232234

233235
[huumanoid](https://github.com/huumanoid) (inactive)
234236

bower.json

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,17 @@
22
"name": "react-tooltip",
33
"description": "react tooltip component",
44
"main": "standalone/react-tooltip.js",
5-
"moduleType": [
6-
"globals",
7-
"amd",
8-
"node"
9-
],
5+
"moduleType": ["globals", "amd", "node"],
106
"license": "MIT",
11-
"ignore": [
12-
"bin",
13-
"example"
14-
],
15-
"keywords": [
16-
"react",
17-
"react-component",
18-
"tooltip",
19-
"react-tooltip"
20-
],
7+
"ignore": ["bin", "example"],
8+
"keywords": ["react", "react-component", "tooltip", "react-tooltip"],
219
"authors": [
22-
"wwayne"
10+
"wwayne",
11+
"danielbarion",
12+
"alexgurr",
13+
"aronhelser",
14+
"roggervalf",
15+
"huumanoid"
2316
],
2417
"homepage": "https://github.com/wwayne/react-tooltip",
2518
"repository": {

package.json

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "react-tooltip",
33
"version": "4.3.0",
44
"description": "react tooltip component",
5+
"private": false,
56
"main": "dist/index.js",
67
"types": "dist/react-tooltip.d.ts",
78
"module": "dist/index.es.js",
@@ -22,7 +23,7 @@
2223
"build:watch": "rollup -c -w",
2324
"start": "npm-run-all clean build:watch",
2425
"gh-pages": "gh-pages -d example",
25-
"github-changes": "github-changes -o wwayne -r react-tooltip -a --only-pulls --use-commit-body",
26+
"github-changes": "github-changes -o ReactTooltip -r react-tooltip -a --only-pulls --use-commit-body",
2627
"copy:types": "cpy ./react-tooltip.d.ts ./dist --parents --dot",
2728
"cm": "git cz",
2829
"semantic-release": "semantic-release",
@@ -33,22 +34,19 @@
3334
"path": "node_modules/cz-conventional-changelog"
3435
}
3536
},
36-
"repository": {
37-
"type": "git",
38-
"url": "https://github.com/wwayne/react-tooltip"
39-
},
37+
"repository": "https://github.com/ReactTooltip/react-tooltip",
4038
"keywords": [
4139
"react",
4240
"react-component",
4341
"tooltip",
4442
"react-tooltip"
4543
],
46-
"author": "wwayne",
44+
"author": "ReactTooltip",
4745
"license": "MIT",
4846
"bugs": {
49-
"url": "https://github.com/wwayne/react-tooltip/issues"
47+
"url": "https://github.com/ReactTooltip/react-tooltip/issues"
5048
},
51-
"homepage": "https://github.com/wwayne/react-tooltip#readme",
49+
"homepage": "https://github.com/ReactTooltip/react-tooltip#readme",
5250
"browserify-shim": {
5351
"react": "global:React",
5452
"react-dom": "global:ReactDOM"
@@ -59,29 +57,33 @@
5957
},
6058
"dependencies": {
6159
"prop-types": "^15.8.1",
62-
"uuid": "^8.3.2"
60+
"uuid": "9.0.0"
6361
},
6462
"devDependencies": {
65-
"@babel/cli": "^7.18.10",
66-
"@babel/core": "^7.18.10",
67-
"@babel/eslint-parser": "^7.18.9",
63+
"@babel/cli": "7.19.3",
64+
"@babel/core": "7.19.3",
65+
"@babel/eslint-parser": "7.19.1",
6866
"@babel/plugin-proposal-class-properties": "^7.18.6",
69-
"@babel/plugin-proposal-decorators": "^7.18.10",
70-
"@babel/plugin-proposal-object-rest-spread": "^7.18.9",
67+
"@babel/plugin-proposal-decorators": "7.19.3",
68+
"@babel/plugin-proposal-json-strings": "^7.18.6",
69+
"@babel/plugin-proposal-object-rest-spread": "7.19.4",
70+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
7171
"@babel/plugin-syntax-import-meta": "^7.10.4",
72+
"@babel/preset-env": "^7.19.4",
73+
"@babel/preset-react": "^7.18.6",
7274
"@babel/register": "^7.18.9",
73-
"@commitlint/cli": "^17.0.3",
74-
"@commitlint/config-conventional": "^17.0.3",
75-
"@commitlint/travis-cli": "^17.0.3",
76-
"@rollup/plugin-commonjs": "^22.0.1",
75+
"@commitlint/cli": "17.1.2",
76+
"@commitlint/config-conventional": "17.1.0",
77+
"@commitlint/travis-cli": "17.1.2",
78+
"@rollup/plugin-commonjs": "23.0.0",
7779
"@rollup/plugin-node-resolve": "^13.3.0",
7880
"@semantic-release/changelog": "^6.0.1",
7981
"@semantic-release/commit-analyzer": "^9.0.2",
8082
"@semantic-release/git": "^10.0.1",
8183
"@semantic-release/npm": "^9.0.1",
8284
"@semantic-release/release-notes-generator": "^10.0.3",
83-
"@svgr/rollup": "^6.3.1",
84-
"@testing-library/react": "^13.3.0",
85+
"@svgr/rollup": "6.4.0",
86+
"@testing-library/react": "13.4.0",
8587
"babel-loader": "8.2.5",
8688
"babelify": "^10.0.0",
8789
"browserify": "^17.0.0",
@@ -90,35 +92,35 @@
9092
"chai-enzyme": "^1.0.0-beta.1",
9193
"chai-spies": "^1.0.0",
9294
"commitizen": "4.2.5",
93-
"concurrently": "^7.3.0",
94-
"core-js": "^3.24.1",
95-
"cpy-cli": "^4.1.0",
95+
"concurrently": "7.4.0",
96+
"core-js": "3.25.5",
97+
"cpy-cli": "4.2.0",
9698
"cz-conventional-changelog": "^3.3.0",
9799
"enzyme": "^3.11.0",
98100
"enzyme-adapter-react-16": "^1.15.6",
99-
"eslint": ">=8.21.0",
101+
"eslint": "8.25.0",
100102
"eslint-config-jss": ">=5.0.1",
101103
"eslint-config-prettier": ">=8.5.0",
102104
"eslint-config-standard": "^17.0.0",
103105
"eslint-config-standard-react": ">=11.0.1",
104106
"eslint-plugin-import": ">=2.26.0",
105107
"eslint-plugin-node": ">=11.1.0",
106108
"eslint-plugin-prettier": "4.2.1",
107-
"eslint-plugin-promise": ">=6.0.0",
108-
"eslint-plugin-react": ">=7.30.1",
109+
"eslint-plugin-promise": "6.1.0",
110+
"eslint-plugin-react": "7.31.10",
109111
"gh-pages": "4.0.0",
110112
"github-changes": "^2.0.3",
111113
"http-server": "^14.1.1",
112114
"husky": "^8.0.0",
113115
"ignore-styles": "5.0.1",
114-
"jsdom": "^20.0.0",
116+
"jsdom": "20.0.1",
115117
"lint-staged": "^13.0.3",
116118
"mocha": "^10.0.0",
117119
"mocha-each": "^2.0.1",
118120
"mocha-jsdom": "^2.0.0",
119121
"npm-run-all": "^4.1.5",
120122
"postcss-nested": "^5.0.6",
121-
"postcss-scss": "^4.0.4",
123+
"postcss-scss": "4.0.5",
122124
"postcss-simple-vars": "^6.0.3",
123125
"prettier": "2.7.1",
124126
"pretty-quick": "^3.1.3",
@@ -131,14 +133,14 @@
131133
"rollup-plugin-eslint": "7.0.0",
132134
"rollup-plugin-peer-deps-external": "^2.2.4",
133135
"rollup-plugin-postcss": "^4.0.2",
134-
"rollup-plugin-sass": "^1.2.13",
136+
"rollup-plugin-sass": "1.12.16",
135137
"rollup-plugin-stylelint": "1.0.0",
136138
"rollup-plugin-url": "^3.0.1",
137-
"sass": "^1.54.1",
138-
"semantic-release": "^19.0.3",
139+
"sass": "1.55.0",
140+
"semantic-release": "19.0.5",
139141
"snazzy": "^9.0.0",
140142
"standard": "^17.0.0",
141-
"stylelint": "14.9.1",
143+
"stylelint": "14.13.0",
142144
"stylelint-config-standard": "26.0.0",
143145
"uglifyjs": "^2.4.10",
144146
"watchify": "^4.0.0"

src/index.js

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class ReactTooltip extends React.Component {
141141
* For unify the bind and unbind listener
142142
*/
143143
bind(methodArray) {
144-
methodArray.forEach(method => {
144+
methodArray.forEach((method) => {
145145
this[method] = this[method].bind(this);
146146
});
147147
}
@@ -158,7 +158,7 @@ class ReactTooltip extends React.Component {
158158
static getDerivedStateFromProps(nextProps, prevState) {
159159
const { ariaProps } = prevState;
160160
const newAriaProps = parseAria(nextProps);
161-
const isChanged = Object.keys(newAriaProps).some(props => {
161+
const isChanged = Object.keys(newAriaProps).some((props) => {
162162
return newAriaProps[props] !== ariaProps[props];
163163
});
164164
if (!isChanged) {
@@ -254,8 +254,8 @@ class ReactTooltip extends React.Component {
254254

255255
// Scan document for shadow DOM elements
256256
nodeListToArray(document.getElementsByTagName('*'))
257-
.filter(element => element.shadowRoot)
258-
.forEach(element => {
257+
.filter((element) => element.shadowRoot)
258+
.forEach((element) => {
259259
targetArray = targetArray.concat(
260260
nodeListToArray(element.shadowRoot.querySelectorAll(selector))
261261
);
@@ -273,7 +273,7 @@ class ReactTooltip extends React.Component {
273273
const { id, globalEventOff, isCapture } = this.props;
274274
const targetArray = this.getTargetArray(id);
275275

276-
targetArray.forEach(target => {
276+
targetArray.forEach((target) => {
277277
if (target.getAttribute('currentItem') === null) {
278278
target.setAttribute('currentItem', 'false');
279279
}
@@ -286,7 +286,7 @@ class ReactTooltip extends React.Component {
286286
if (this.isBodyMode()) {
287287
this.bindBodyListener(targetArray);
288288
} else {
289-
targetArray.forEach(target => {
289+
targetArray.forEach((target) => {
290290
const isCaptureMode = this.isCapture(target);
291291
const effect = this.getEffect(target);
292292
if (this.isCustomEvent(target)) {
@@ -327,7 +327,7 @@ class ReactTooltip extends React.Component {
327327
this.unbindBodyListener();
328328
} else {
329329
const targetArray = this.getTargetArray(id);
330-
targetArray.forEach(target => {
330+
targetArray.forEach((target) => {
331331
this.unbindBasicListener(target);
332332
if (this.isCustomEvent(target)) this.customUnbindListener(target);
333333
});
@@ -389,7 +389,7 @@ class ReactTooltip extends React.Component {
389389
if (isGlobalCall) {
390390
// Don't trigger other elements belongs to other ReactTooltip
391391
const targetArray = this.getTargetArray(this.props.id);
392-
const isMyElement = targetArray.some(ele => ele === e.currentTarget);
392+
const isMyElement = targetArray.some((ele) => ele === e.currentTarget);
393393
if (!isMyElement) return;
394394
}
395395
// Get the tooltip content
@@ -641,7 +641,7 @@ class ReactTooltip extends React.Component {
641641
if (hasTarget) {
642642
// Don't trigger other elements belongs to other ReactTooltip
643643
const targetArray = this.getTargetArray(this.props.id);
644-
const isMyElement = targetArray.some(ele => ele === e.currentTarget);
644+
const isMyElement = targetArray.some((ele) => ele === e.currentTarget);
645645
if (!isMyElement || !this.state.show) return;
646646
}
647647

@@ -703,14 +703,8 @@ class ReactTooltip extends React.Component {
703703

704704
// Calculation the position
705705
updatePosition(callbackAfter) {
706-
const {
707-
currentEvent,
708-
currentTarget,
709-
place,
710-
desiredPlace,
711-
effect,
712-
offset
713-
} = this.state;
706+
const { currentEvent, currentTarget, place, desiredPlace, effect, offset } =
707+
this.state;
714708
const node = this.tooltipRef;
715709
const result = getPosition(
716710
currentEvent,
@@ -741,7 +735,9 @@ class ReactTooltip extends React.Component {
741735
});
742736
}
743737

744-
callbackAfter();
738+
if (callbackAfter && typeof callbackAfter === 'function') {
739+
callbackAfter();
740+
}
745741

746742
// Set tooltip position
747743
node.style.left = result.position.left + 'px';
@@ -773,7 +769,7 @@ class ReactTooltip extends React.Component {
773769
hasCustomColors() {
774770
return Boolean(
775771
Object.keys(this.state.customColors).find(
776-
color => color !== 'border' && this.state.customColors[color]
772+
(color) => color !== 'border' && this.state.customColors[color]
777773
) ||
778774
(this.state.border && this.state.customColors['border'])
779775
);
@@ -818,7 +814,7 @@ class ReactTooltip extends React.Component {
818814
<Wrapper
819815
className={`${wrapperClassName}`}
820816
id={this.props.id || uuid}
821-
ref={ref => (this.tooltipRef = ref)}
817+
ref={(ref) => (this.tooltipRef = ref)}
822818
{...ariaProps}
823819
data-id="tooltip"
824820
dangerouslySetInnerHTML={{ __html: htmlContent }}
@@ -830,7 +826,7 @@ class ReactTooltip extends React.Component {
830826
className={`${wrapperClassName}`}
831827
id={this.props.id || uuid}
832828
{...ariaProps}
833-
ref={ref => (this.tooltipRef = ref)}
829+
ref={(ref) => (this.tooltipRef = ref)}
834830
data-id="tooltip"
835831
>
836832
<style

0 commit comments

Comments
 (0)