@atlaskit/react-ufo 2.0.2 → 2.0.3
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 +8 -0
- package/dist/cjs/create-post-interaction-log-payload/index.js +7 -1
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +2 -3
- package/dist/es2019/create-post-interaction-log-payload/index.js +7 -1
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +1 -2
- package/dist/esm/create-post-interaction-log-payload/index.js +7 -1
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +2 -3
- package/dist/types/create-post-interaction-log-payload/index.d.ts +2 -0
- package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#157758](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157758)
|
|
8
|
+
[`0a582096048e6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0a582096048e6) -
|
|
9
|
+
add vc clean field to post interaction log
|
|
10
|
+
|
|
3
11
|
## 2.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -138,15 +138,19 @@ function createPostInteractionLogPayload(_ref2) {
|
|
|
138
138
|
var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
|
|
139
139
|
var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
|
|
140
140
|
var lastInteractionFinishVC90 = null;
|
|
141
|
+
var lastInteractionFinishVCClean = false;
|
|
141
142
|
if (lastInteractionFinishVCResult !== null && lastInteractionFinishVCResult !== void 0 && lastInteractionFinishVCResult['ufo:vc:state']) {
|
|
142
143
|
var _lastInteractionFinis;
|
|
144
|
+
lastInteractionFinishVCClean = true;
|
|
143
145
|
var lastInteractionFinishVCMetrics = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['metrics:vc'];
|
|
144
146
|
lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishVCMetrics[90]) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
|
|
145
147
|
}
|
|
146
148
|
var postInteractionFinishVCRatios = {};
|
|
147
149
|
var revisedVC90 = null;
|
|
148
150
|
var postInteractionFinishVCUpdates = [];
|
|
151
|
+
var postInteractionFinishVCClean = false;
|
|
149
152
|
if (postInteractionFinishVCResult !== null && postInteractionFinishVCResult !== void 0 && postInteractionFinishVCResult['ufo:vc:state']) {
|
|
153
|
+
postInteractionFinishVCClean = true;
|
|
150
154
|
postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
|
|
151
155
|
postInteractionFinishVCUpdates = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:updates'];
|
|
152
156
|
var postInteractionFinishVCMetrics = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['metrics:vc'];
|
|
@@ -193,11 +197,13 @@ function createPostInteractionLogPayload(_ref2) {
|
|
|
193
197
|
start: lastInteractionFinishStart,
|
|
194
198
|
end: lastInteractionFinishEnd,
|
|
195
199
|
ttai: lastInteractionFinishTTAI,
|
|
196
|
-
vc90: lastInteractionFinishVC90
|
|
200
|
+
vc90: lastInteractionFinishVC90,
|
|
201
|
+
vcClean: lastInteractionFinishVCClean
|
|
197
202
|
}),
|
|
198
203
|
revisedEndTime: revisedEndTime,
|
|
199
204
|
revisedTtai: revisedTtai,
|
|
200
205
|
revisedVC90: revisedVC90,
|
|
206
|
+
vcClean: postInteractionFinishVCClean,
|
|
201
207
|
lateMutations: lateMutations,
|
|
202
208
|
reactProfilerTimings: transformReactProfilerTimings(reactProfilerTimings)
|
|
203
209
|
}
|
|
@@ -8,7 +8,6 @@ exports.SSRPlaceholderHandlers = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var EQUALITY_THRESHOLD = 0.1;
|
|
13
12
|
var ANCESTOR_LOOKUP_LIMIT = 10;
|
|
14
13
|
var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
@@ -55,9 +54,9 @@ var SSRPlaceholderHandlers = exports.SSRPlaceholderHandlers = /*#__PURE__*/funct
|
|
|
55
54
|
}
|
|
56
55
|
});
|
|
57
56
|
this.intersectionObserver = new IntersectionObserver(function (entries) {
|
|
58
|
-
return
|
|
57
|
+
return entries.filter(function (entry) {
|
|
59
58
|
return entry.intersectionRatio > 0;
|
|
60
|
-
}).forEach(_this.intersectionObserverCallback)
|
|
59
|
+
}).forEach(_this.intersectionObserverCallback);
|
|
61
60
|
});
|
|
62
61
|
if (window.document) {
|
|
63
62
|
try {
|
|
@@ -123,15 +123,19 @@ export default function createPostInteractionLogPayload({
|
|
|
123
123
|
const lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
|
|
124
124
|
const lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
|
|
125
125
|
let lastInteractionFinishVC90 = null;
|
|
126
|
+
let lastInteractionFinishVCClean = false;
|
|
126
127
|
if (lastInteractionFinishVCResult !== null && lastInteractionFinishVCResult !== void 0 && lastInteractionFinishVCResult['ufo:vc:state']) {
|
|
127
128
|
var _lastInteractionFinis;
|
|
129
|
+
lastInteractionFinishVCClean = true;
|
|
128
130
|
const lastInteractionFinishVCMetrics = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['metrics:vc'];
|
|
129
131
|
lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishVCMetrics[90]) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
|
|
130
132
|
}
|
|
131
133
|
let postInteractionFinishVCRatios = {};
|
|
132
134
|
let revisedVC90 = null;
|
|
133
135
|
let postInteractionFinishVCUpdates = [];
|
|
136
|
+
let postInteractionFinishVCClean = false;
|
|
134
137
|
if (postInteractionFinishVCResult !== null && postInteractionFinishVCResult !== void 0 && postInteractionFinishVCResult['ufo:vc:state']) {
|
|
138
|
+
postInteractionFinishVCClean = true;
|
|
135
139
|
postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
|
|
136
140
|
postInteractionFinishVCUpdates = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:updates'];
|
|
137
141
|
const postInteractionFinishVCMetrics = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['metrics:vc'];
|
|
@@ -174,11 +178,13 @@ export default function createPostInteractionLogPayload({
|
|
|
174
178
|
start: lastInteractionFinishStart,
|
|
175
179
|
end: lastInteractionFinishEnd,
|
|
176
180
|
ttai: lastInteractionFinishTTAI,
|
|
177
|
-
vc90: lastInteractionFinishVC90
|
|
181
|
+
vc90: lastInteractionFinishVC90,
|
|
182
|
+
vcClean: lastInteractionFinishVCClean
|
|
178
183
|
},
|
|
179
184
|
revisedEndTime,
|
|
180
185
|
revisedTtai,
|
|
181
186
|
revisedVC90,
|
|
187
|
+
vcClean: postInteractionFinishVCClean,
|
|
182
188
|
lateMutations,
|
|
183
189
|
reactProfilerTimings: transformReactProfilerTimings(reactProfilerTimings)
|
|
184
190
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
const EQUALITY_THRESHOLD = 0.1;
|
|
4
3
|
const ANCESTOR_LOOKUP_LIMIT = 10;
|
|
5
4
|
export class SSRPlaceholderHandlers {
|
|
@@ -44,7 +43,7 @@ export class SSRPlaceholderHandlers {
|
|
|
44
43
|
this.reactValidateCallbacks.delete(staticKey);
|
|
45
44
|
}
|
|
46
45
|
});
|
|
47
|
-
this.intersectionObserver = new IntersectionObserver(entries =>
|
|
46
|
+
this.intersectionObserver = new IntersectionObserver(entries => entries.filter(entry => entry.intersectionRatio > 0).forEach(this.intersectionObserverCallback));
|
|
48
47
|
if (window.document) {
|
|
49
48
|
try {
|
|
50
49
|
const existingElements = document.querySelectorAll('[data-ssr-placeholder]');
|
|
@@ -131,15 +131,19 @@ export default function createPostInteractionLogPayload(_ref2) {
|
|
|
131
131
|
var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
|
|
132
132
|
var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
|
|
133
133
|
var lastInteractionFinishVC90 = null;
|
|
134
|
+
var lastInteractionFinishVCClean = false;
|
|
134
135
|
if (lastInteractionFinishVCResult !== null && lastInteractionFinishVCResult !== void 0 && lastInteractionFinishVCResult['ufo:vc:state']) {
|
|
135
136
|
var _lastInteractionFinis;
|
|
137
|
+
lastInteractionFinishVCClean = true;
|
|
136
138
|
var lastInteractionFinishVCMetrics = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['metrics:vc'];
|
|
137
139
|
lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishVCMetrics[90]) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
|
|
138
140
|
}
|
|
139
141
|
var postInteractionFinishVCRatios = {};
|
|
140
142
|
var revisedVC90 = null;
|
|
141
143
|
var postInteractionFinishVCUpdates = [];
|
|
144
|
+
var postInteractionFinishVCClean = false;
|
|
142
145
|
if (postInteractionFinishVCResult !== null && postInteractionFinishVCResult !== void 0 && postInteractionFinishVCResult['ufo:vc:state']) {
|
|
146
|
+
postInteractionFinishVCClean = true;
|
|
143
147
|
postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
|
|
144
148
|
postInteractionFinishVCUpdates = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:updates'];
|
|
145
149
|
var postInteractionFinishVCMetrics = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['metrics:vc'];
|
|
@@ -186,11 +190,13 @@ export default function createPostInteractionLogPayload(_ref2) {
|
|
|
186
190
|
start: lastInteractionFinishStart,
|
|
187
191
|
end: lastInteractionFinishEnd,
|
|
188
192
|
ttai: lastInteractionFinishTTAI,
|
|
189
|
-
vc90: lastInteractionFinishVC90
|
|
193
|
+
vc90: lastInteractionFinishVC90,
|
|
194
|
+
vcClean: lastInteractionFinishVCClean
|
|
190
195
|
}),
|
|
191
196
|
revisedEndTime: revisedEndTime,
|
|
192
197
|
revisedTtai: revisedTtai,
|
|
193
198
|
revisedVC90: revisedVC90,
|
|
199
|
+
vcClean: postInteractionFinishVCClean,
|
|
194
200
|
lateMutations: lateMutations,
|
|
195
201
|
reactProfilerTimings: transformReactProfilerTimings(reactProfilerTimings)
|
|
196
202
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
var EQUALITY_THRESHOLD = 0.1;
|
|
6
5
|
var ANCESTOR_LOOKUP_LIMIT = 10;
|
|
7
6
|
export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
@@ -48,9 +47,9 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
49
|
this.intersectionObserver = new IntersectionObserver(function (entries) {
|
|
51
|
-
return
|
|
50
|
+
return entries.filter(function (entry) {
|
|
52
51
|
return entry.intersectionRatio > 0;
|
|
53
|
-
}).forEach(_this.intersectionObserverCallback)
|
|
52
|
+
}).forEach(_this.intersectionObserverCallback);
|
|
54
53
|
});
|
|
55
54
|
if (window.document) {
|
|
56
55
|
try {
|
|
@@ -24,6 +24,7 @@ export default function createPostInteractionLogPayload({ lastInteractionFinish,
|
|
|
24
24
|
end: number;
|
|
25
25
|
ttai: number;
|
|
26
26
|
vc90: number | null;
|
|
27
|
+
vcClean: boolean;
|
|
27
28
|
type: import("../common").InteractionType;
|
|
28
29
|
id: string;
|
|
29
30
|
abortReason?: import("../common").AbortReasonType | undefined;
|
|
@@ -33,6 +34,7 @@ export default function createPostInteractionLogPayload({ lastInteractionFinish,
|
|
|
33
34
|
revisedEndTime: number;
|
|
34
35
|
revisedTtai: number;
|
|
35
36
|
revisedVC90: number | null;
|
|
37
|
+
vcClean: boolean;
|
|
36
38
|
lateMutations: {
|
|
37
39
|
time: number;
|
|
38
40
|
element: string;
|
|
@@ -24,6 +24,7 @@ export default function createPostInteractionLogPayload({ lastInteractionFinish,
|
|
|
24
24
|
end: number;
|
|
25
25
|
ttai: number;
|
|
26
26
|
vc90: number | null;
|
|
27
|
+
vcClean: boolean;
|
|
27
28
|
type: import("../common").InteractionType;
|
|
28
29
|
id: string;
|
|
29
30
|
abortReason?: import("../common").AbortReasonType | undefined;
|
|
@@ -33,6 +34,7 @@ export default function createPostInteractionLogPayload({ lastInteractionFinish,
|
|
|
33
34
|
revisedEndTime: number;
|
|
34
35
|
revisedTtai: number;
|
|
35
36
|
revisedVC90: number | null;
|
|
37
|
+
vcClean: boolean;
|
|
36
38
|
lateMutations: {
|
|
37
39
|
time: number;
|
|
38
40
|
element: string;
|