@atlaskit/react-ufo 5.2.0 → 5.2.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 +7 -0
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/cjs/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +11 -19
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/es2019/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +12 -20
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/esm/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +11 -19
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 5.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`de657e97bdb75`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/de657e97bdb75) -
|
|
8
|
+
FG cleanup - platform_ufo_vc_ignore_display_none_mutations
|
|
9
|
+
|
|
3
10
|
## 5.2.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -52,7 +52,7 @@ var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCC
|
|
|
52
52
|
if (!getConsideredEntryTypes(include3p, excludeSmartAnswersInSearch).includes(entry.data.type)) {
|
|
53
53
|
return false;
|
|
54
54
|
}
|
|
55
|
-
if (entry.data.type === 'mutation:attribute:framework-routing'
|
|
55
|
+
if (entry.data.type === 'mutation:attribute:framework-routing') {
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
58
|
if (excludeSmartAnswersInSearch && (0, _isEntrySmartAnswersInSearch.isEntrySmartAnswersInSearch)(entry) && !(0, _platformFeatureFlags.fg)('rovo_search_page_ttvc_ignoring_smart_answers_fix')) {
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createIntersectionObserver = createIntersectionObserver;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var _isZeroDimensionRectangle = require("../utils/is-zero-dimension-rectangle");
|
|
9
8
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
10
9
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -38,28 +37,21 @@ function createIntersectionObserver(_ref) {
|
|
|
38
37
|
|
|
39
38
|
// override as display-contents mutation
|
|
40
39
|
if (tagOrCallbackResult && typeof tagOrCallbackResult !== 'string' && tagOrCallbackResult.type === 'mutation:attribute') {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (isRoutingMutation) {
|
|
48
|
-
return {
|
|
49
|
-
type: 'mutation:attribute:framework-routing',
|
|
50
|
-
mutationData: tagOrCallbackResult.mutationData
|
|
51
|
-
};
|
|
52
|
-
}
|
|
40
|
+
var _tagOrCallbackResult$ = tagOrCallbackResult.mutationData,
|
|
41
|
+
attributeName = _tagOrCallbackResult$.attributeName,
|
|
42
|
+
oldValue = _tagOrCallbackResult$.oldValue,
|
|
43
|
+
newValue = _tagOrCallbackResult$.newValue;
|
|
44
|
+
var isRoutingMutation = attributeName === 'style' && (!oldValue && newValue === 'display: none !important;' || oldValue === 'display: none !important;' && !newValue);
|
|
45
|
+
if (isRoutingMutation) {
|
|
53
46
|
return {
|
|
54
|
-
type: 'mutation:
|
|
55
|
-
mutationData: tagOrCallbackResult.mutationData
|
|
56
|
-
};
|
|
57
|
-
} else {
|
|
58
|
-
return {
|
|
59
|
-
type: 'mutation:display-contents-children-attribute',
|
|
47
|
+
type: 'mutation:attribute:framework-routing',
|
|
60
48
|
mutationData: tagOrCallbackResult.mutationData
|
|
61
49
|
};
|
|
62
50
|
}
|
|
51
|
+
return {
|
|
52
|
+
type: 'mutation:display-contents-children-attribute',
|
|
53
|
+
mutationData: tagOrCallbackResult.mutationData
|
|
54
|
+
};
|
|
63
55
|
}
|
|
64
56
|
return tagOrCallbackResult;
|
|
65
57
|
};
|
|
@@ -34,7 +34,7 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
|
34
34
|
if (!getConsideredEntryTypes(include3p, excludeSmartAnswersInSearch).includes(entry.data.type)) {
|
|
35
35
|
return false;
|
|
36
36
|
}
|
|
37
|
-
if (entry.data.type === 'mutation:attribute:framework-routing'
|
|
37
|
+
if (entry.data.type === 'mutation:attribute:framework-routing') {
|
|
38
38
|
return false;
|
|
39
39
|
}
|
|
40
40
|
if (excludeSmartAnswersInSearch && isEntrySmartAnswersInSearch(entry) && !fg('rovo_search_page_ttvc_ignoring_smart_answers_fix')) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { isZeroDimensionRectangle } from '../utils/is-zero-dimension-rectangle';
|
|
3
2
|
function isValidEntry(entry) {
|
|
4
3
|
return entry.isIntersecting && entry.intersectionRect.width > 0 && entry.intersectionRect.height > 0;
|
|
@@ -31,29 +30,22 @@ export function createIntersectionObserver({
|
|
|
31
30
|
|
|
32
31
|
// override as display-contents mutation
|
|
33
32
|
if (tagOrCallbackResult && typeof tagOrCallbackResult !== 'string' && tagOrCallbackResult.type === 'mutation:attribute') {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (isRoutingMutation) {
|
|
42
|
-
return {
|
|
43
|
-
type: 'mutation:attribute:framework-routing',
|
|
44
|
-
mutationData: tagOrCallbackResult.mutationData
|
|
45
|
-
};
|
|
46
|
-
}
|
|
33
|
+
const {
|
|
34
|
+
attributeName,
|
|
35
|
+
oldValue,
|
|
36
|
+
newValue
|
|
37
|
+
} = tagOrCallbackResult.mutationData;
|
|
38
|
+
const isRoutingMutation = attributeName === 'style' && (!oldValue && newValue === 'display: none !important;' || oldValue === 'display: none !important;' && !newValue);
|
|
39
|
+
if (isRoutingMutation) {
|
|
47
40
|
return {
|
|
48
|
-
type: 'mutation:
|
|
49
|
-
mutationData: tagOrCallbackResult.mutationData
|
|
50
|
-
};
|
|
51
|
-
} else {
|
|
52
|
-
return {
|
|
53
|
-
type: 'mutation:display-contents-children-attribute',
|
|
41
|
+
type: 'mutation:attribute:framework-routing',
|
|
54
42
|
mutationData: tagOrCallbackResult.mutationData
|
|
55
43
|
};
|
|
56
44
|
}
|
|
45
|
+
return {
|
|
46
|
+
type: 'mutation:display-contents-children-attribute',
|
|
47
|
+
mutationData: tagOrCallbackResult.mutationData
|
|
48
|
+
};
|
|
57
49
|
}
|
|
58
50
|
return tagOrCallbackResult;
|
|
59
51
|
};
|
|
@@ -45,7 +45,7 @@ var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
|
|
|
45
45
|
if (!getConsideredEntryTypes(include3p, excludeSmartAnswersInSearch).includes(entry.data.type)) {
|
|
46
46
|
return false;
|
|
47
47
|
}
|
|
48
|
-
if (entry.data.type === 'mutation:attribute:framework-routing'
|
|
48
|
+
if (entry.data.type === 'mutation:attribute:framework-routing') {
|
|
49
49
|
return false;
|
|
50
50
|
}
|
|
51
51
|
if (excludeSmartAnswersInSearch && isEntrySmartAnswersInSearch(entry) && !fg('rovo_search_page_ttvc_ignoring_smart_answers_fix')) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2
2
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
3
3
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { isZeroDimensionRectangle } from '../utils/is-zero-dimension-rectangle';
|
|
6
5
|
function isValidEntry(entry) {
|
|
7
6
|
return entry.isIntersecting && entry.intersectionRect.width > 0 && entry.intersectionRect.height > 0;
|
|
@@ -32,28 +31,21 @@ export function createIntersectionObserver(_ref) {
|
|
|
32
31
|
|
|
33
32
|
// override as display-contents mutation
|
|
34
33
|
if (tagOrCallbackResult && typeof tagOrCallbackResult !== 'string' && tagOrCallbackResult.type === 'mutation:attribute') {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (isRoutingMutation) {
|
|
42
|
-
return {
|
|
43
|
-
type: 'mutation:attribute:framework-routing',
|
|
44
|
-
mutationData: tagOrCallbackResult.mutationData
|
|
45
|
-
};
|
|
46
|
-
}
|
|
34
|
+
var _tagOrCallbackResult$ = tagOrCallbackResult.mutationData,
|
|
35
|
+
attributeName = _tagOrCallbackResult$.attributeName,
|
|
36
|
+
oldValue = _tagOrCallbackResult$.oldValue,
|
|
37
|
+
newValue = _tagOrCallbackResult$.newValue;
|
|
38
|
+
var isRoutingMutation = attributeName === 'style' && (!oldValue && newValue === 'display: none !important;' || oldValue === 'display: none !important;' && !newValue);
|
|
39
|
+
if (isRoutingMutation) {
|
|
47
40
|
return {
|
|
48
|
-
type: 'mutation:
|
|
49
|
-
mutationData: tagOrCallbackResult.mutationData
|
|
50
|
-
};
|
|
51
|
-
} else {
|
|
52
|
-
return {
|
|
53
|
-
type: 'mutation:display-contents-children-attribute',
|
|
41
|
+
type: 'mutation:attribute:framework-routing',
|
|
54
42
|
mutationData: tagOrCallbackResult.mutationData
|
|
55
43
|
};
|
|
56
44
|
}
|
|
45
|
+
return {
|
|
46
|
+
type: 'mutation:display-contents-children-attribute',
|
|
47
|
+
mutationData: tagOrCallbackResult.mutationData
|
|
48
|
+
};
|
|
57
49
|
}
|
|
58
50
|
return tagOrCallbackResult;
|
|
59
51
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -182,9 +182,6 @@
|
|
|
182
182
|
"platform_mark_ufo_segment_first_load": {
|
|
183
183
|
"type": "boolean"
|
|
184
184
|
},
|
|
185
|
-
"platform_ufo_vc_ignore_display_none_mutations": {
|
|
186
|
-
"type": "boolean"
|
|
187
|
-
},
|
|
188
185
|
"platform_ufo_keypress_interaction_abort": {
|
|
189
186
|
"type": "boolean"
|
|
190
187
|
},
|