@atlaskit/react-ufo 2.8.0 → 2.8.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/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 2.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98925](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98925)
|
|
8
|
+
[`4c9eae0d55227`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4c9eae0d55227) -
|
|
9
|
+
Adjust logic on when to apply getBoundingClientRect check for target rect
|
|
10
|
+
|
|
3
11
|
## 2.8.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -37,14 +37,19 @@ var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/funct
|
|
|
37
37
|
}
|
|
38
38
|
var rect = _this.staticPlaceholders.get(staticKey);
|
|
39
39
|
if ((0, _platformFeatureFlags.fg)('platform_ufo_ssr_ttvc_use_target_rect')) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var hasSameSizePosition = _this.hasSameSizePosition(rect, targetRect);
|
|
40
|
+
var hasSameSizePosition = _this.hasSameSizePosition(rect, boundingClientRect);
|
|
41
|
+
if (hasSameSizePosition) {
|
|
43
42
|
_resolve(hasSameSizePosition);
|
|
44
|
-
}
|
|
43
|
+
} else {
|
|
44
|
+
requestAnimationFrame(function () {
|
|
45
|
+
var targetRect = target.getBoundingClientRect();
|
|
46
|
+
var hasSameSizePosition = _this.hasSameSizePosition(rect, targetRect);
|
|
47
|
+
_resolve(hasSameSizePosition);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
45
50
|
} else {
|
|
46
|
-
var
|
|
47
|
-
_resolve(
|
|
51
|
+
var _hasSameSizePosition = _this.hasSameSizePosition(rect, boundingClientRect);
|
|
52
|
+
_resolve(_hasSameSizePosition);
|
|
48
53
|
}
|
|
49
54
|
_this.callbacks.delete(staticKey);
|
|
50
55
|
}
|
|
@@ -56,14 +61,19 @@ var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/funct
|
|
|
56
61
|
}
|
|
57
62
|
var _rect = _this.staticPlaceholders.get(key);
|
|
58
63
|
if ((0, _platformFeatureFlags.fg)('platform_ufo_ssr_ttvc_use_target_rect')) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
var _hasSameSizePosition2 = _this.hasSameSizePosition(_rect, boundingClientRect);
|
|
65
|
+
if (_hasSameSizePosition2) {
|
|
66
|
+
_resolve2(_hasSameSizePosition2);
|
|
67
|
+
} else {
|
|
68
|
+
requestAnimationFrame(function () {
|
|
69
|
+
var targetRect = target.getBoundingClientRect();
|
|
70
|
+
var hasSameSizePosition = _this.hasSameSizePosition(_rect, targetRect);
|
|
71
|
+
_resolve2(hasSameSizePosition);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
64
74
|
} else {
|
|
65
|
-
var
|
|
66
|
-
_resolve2(
|
|
75
|
+
var _hasSameSizePosition3 = _this.hasSameSizePosition(_rect, boundingClientRect);
|
|
76
|
+
_resolve2(_hasSameSizePosition3);
|
|
67
77
|
}
|
|
68
78
|
_this.staticPlaceholders.delete(staticKey);
|
|
69
79
|
_this.reactValidateCallbacks.delete(staticKey);
|
|
@@ -27,11 +27,16 @@ export class SSRPlaceholderHandlers {
|
|
|
27
27
|
}
|
|
28
28
|
const rect = this.staticPlaceholders.get(staticKey);
|
|
29
29
|
if (fg('platform_ufo_ssr_ttvc_use_target_rect')) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const hasSameSizePosition = this.hasSameSizePosition(rect, targetRect);
|
|
30
|
+
const hasSameSizePosition = this.hasSameSizePosition(rect, boundingClientRect);
|
|
31
|
+
if (hasSameSizePosition) {
|
|
33
32
|
resolve(hasSameSizePosition);
|
|
34
|
-
}
|
|
33
|
+
} else {
|
|
34
|
+
requestAnimationFrame(() => {
|
|
35
|
+
const targetRect = target.getBoundingClientRect();
|
|
36
|
+
const hasSameSizePosition = this.hasSameSizePosition(rect, targetRect);
|
|
37
|
+
resolve(hasSameSizePosition);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
35
40
|
} else {
|
|
36
41
|
const hasSameSizePosition = this.hasSameSizePosition(rect, boundingClientRect);
|
|
37
42
|
resolve(hasSameSizePosition);
|
|
@@ -46,11 +51,16 @@ export class SSRPlaceholderHandlers {
|
|
|
46
51
|
}
|
|
47
52
|
const rect = this.staticPlaceholders.get(key);
|
|
48
53
|
if (fg('platform_ufo_ssr_ttvc_use_target_rect')) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const hasSameSizePosition = this.hasSameSizePosition(rect, targetRect);
|
|
54
|
+
const hasSameSizePosition = this.hasSameSizePosition(rect, boundingClientRect);
|
|
55
|
+
if (hasSameSizePosition) {
|
|
52
56
|
resolve(hasSameSizePosition);
|
|
53
|
-
}
|
|
57
|
+
} else {
|
|
58
|
+
requestAnimationFrame(() => {
|
|
59
|
+
const targetRect = target.getBoundingClientRect();
|
|
60
|
+
const hasSameSizePosition = this.hasSameSizePosition(rect, targetRect);
|
|
61
|
+
resolve(hasSameSizePosition);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
54
64
|
} else {
|
|
55
65
|
const hasSameSizePosition = this.hasSameSizePosition(rect, boundingClientRect);
|
|
56
66
|
resolve(hasSameSizePosition);
|
|
@@ -30,14 +30,19 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
30
30
|
}
|
|
31
31
|
var rect = _this.staticPlaceholders.get(staticKey);
|
|
32
32
|
if (fg('platform_ufo_ssr_ttvc_use_target_rect')) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var hasSameSizePosition = _this.hasSameSizePosition(rect, targetRect);
|
|
33
|
+
var hasSameSizePosition = _this.hasSameSizePosition(rect, boundingClientRect);
|
|
34
|
+
if (hasSameSizePosition) {
|
|
36
35
|
_resolve(hasSameSizePosition);
|
|
37
|
-
}
|
|
36
|
+
} else {
|
|
37
|
+
requestAnimationFrame(function () {
|
|
38
|
+
var targetRect = target.getBoundingClientRect();
|
|
39
|
+
var hasSameSizePosition = _this.hasSameSizePosition(rect, targetRect);
|
|
40
|
+
_resolve(hasSameSizePosition);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
38
43
|
} else {
|
|
39
|
-
var
|
|
40
|
-
_resolve(
|
|
44
|
+
var _hasSameSizePosition = _this.hasSameSizePosition(rect, boundingClientRect);
|
|
45
|
+
_resolve(_hasSameSizePosition);
|
|
41
46
|
}
|
|
42
47
|
_this.callbacks.delete(staticKey);
|
|
43
48
|
}
|
|
@@ -49,14 +54,19 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
49
54
|
}
|
|
50
55
|
var _rect = _this.staticPlaceholders.get(key);
|
|
51
56
|
if (fg('platform_ufo_ssr_ttvc_use_target_rect')) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
var _hasSameSizePosition2 = _this.hasSameSizePosition(_rect, boundingClientRect);
|
|
58
|
+
if (_hasSameSizePosition2) {
|
|
59
|
+
_resolve2(_hasSameSizePosition2);
|
|
60
|
+
} else {
|
|
61
|
+
requestAnimationFrame(function () {
|
|
62
|
+
var targetRect = target.getBoundingClientRect();
|
|
63
|
+
var hasSameSizePosition = _this.hasSameSizePosition(_rect, targetRect);
|
|
64
|
+
_resolve2(hasSameSizePosition);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
57
67
|
} else {
|
|
58
|
-
var
|
|
59
|
-
_resolve2(
|
|
68
|
+
var _hasSameSizePosition3 = _this.hasSameSizePosition(_rect, boundingClientRect);
|
|
69
|
+
_resolve2(_hasSameSizePosition3);
|
|
60
70
|
}
|
|
61
71
|
_this.staticPlaceholders.delete(staticKey);
|
|
62
72
|
_this.reactValidateCallbacks.delete(staticKey);
|