@atlaskit/contextual-survey 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/contextual-survey
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#149900](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149900)
8
+ [`1b67ed4471db0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1b67ed4471db0) -
9
+ bumped to react18
10
+
3
11
  ## 2.4.0
4
12
 
5
13
  ### Minor Changes
@@ -72,6 +72,11 @@ var _default = exports.default = function _default(_ref) {
72
72
  (0, _react.useEffect)(function () {
73
73
  onDismissRef.current = onDismiss;
74
74
  }, [onDismiss]);
75
+
76
+ // reset isDismissedRef.current on mount to be compatible with double render in react18 strict mode
77
+ (0, _react.useEffect)(function () {
78
+ isDismissedRef.current = false;
79
+ }, []);
75
80
  var tryClearTimeout = (0, _react.useCallback)(function () {
76
81
  var id = autoDisappearTimeoutRef.current;
77
82
  if (id) {
@@ -55,6 +55,11 @@ export default (({
55
55
  useEffect(() => {
56
56
  onDismissRef.current = onDismiss;
57
57
  }, [onDismiss]);
58
+
59
+ // reset isDismissedRef.current on mount to be compatible with double render in react18 strict mode
60
+ useEffect(() => {
61
+ isDismissedRef.current = false;
62
+ }, []);
58
63
  const tryClearTimeout = useCallback(() => {
59
64
  const id = autoDisappearTimeoutRef.current;
60
65
  if (id) {
@@ -62,6 +62,11 @@ export default (function (_ref) {
62
62
  useEffect(function () {
63
63
  onDismissRef.current = onDismiss;
64
64
  }, [onDismiss]);
65
+
66
+ // reset isDismissedRef.current on mount to be compatible with double render in react18 strict mode
67
+ useEffect(function () {
68
+ isDismissedRef.current = false;
69
+ }, []);
65
70
  var tryClearTimeout = useCallback(function () {
66
71
  var id = autoDisappearTimeoutRef.current;
67
72
  if (id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "A React component used to ask the user for feedback",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,6 +28,7 @@
28
28
  "./types": "./src/types.ts"
29
29
  },
30
30
  "atlassian": {
31
+ "runReact18": true,
31
32
  "team": "Personalization",
32
33
  "website": {
33
34
  "name": "Contextual Survey"
@@ -38,7 +39,7 @@
38
39
  "@atlaskit/checkbox": "^14.0.0",
39
40
  "@atlaskit/form": "^10.5.0",
40
41
  "@atlaskit/heading": "^2.4.0",
41
- "@atlaskit/icon": "^22.20.0",
42
+ "@atlaskit/icon": "^22.22.0",
42
43
  "@atlaskit/primitives": "^12.2.0",
43
44
  "@atlaskit/textarea": "^5.6.0",
44
45
  "@atlaskit/theme": "^13.0.0",
@@ -49,7 +50,7 @@
49
50
  "react-transition-group": "^4.4.1"
50
51
  },
51
52
  "peerDependencies": {
52
- "react": "^16.8.0"
53
+ "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@testing-library/react": "^12.1.5",