@atlaskit/react-ufo 3.13.24 → 3.13.25

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
+ ## 3.13.25
4
+
5
+ ### Patch Changes
6
+
7
+ - [#174299](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/174299)
8
+ [`d5a2065348f4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5a2065348f4d) -
9
+ Use most recent VC revision for post interaction log late mutation
10
+
3
11
  ## 3.13.24
4
12
 
5
13
  ### Patch Changes
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
11
  var _coinflip = _interopRequireDefault(require("../coinflip"));
11
12
  var _config = require("../config");
12
13
  var _utils = require("../create-payload/common/utils");
@@ -150,12 +151,13 @@ function createPostInteractionLogPayload(_ref2) {
150
151
  var lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
151
152
  var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
152
153
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
154
+ var mostRecentVCRevision = (0, _platformFeatureFlags.fg)('platform_ufo_post_interaction_most_recent_vc_rev') ? (0, _config.getMostRecentVCRevision)(lastInteractionFinish.ufoName) : 'fy25.02';
153
155
  var lastInteractionFinishVC90 = null;
154
156
  var lastInteractionFinishVCClean = false;
155
157
  var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
156
158
  var lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(function (_ref3) {
157
159
  var revision = _ref3.revision;
158
- return revision === 'fy25.02';
160
+ return revision === mostRecentVCRevision;
159
161
  });
160
162
  if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
161
163
  var _lastInteractionFinis;
@@ -169,7 +171,7 @@ function createPostInteractionLogPayload(_ref2) {
169
171
  var postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
170
172
  var postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(function (_ref4) {
171
173
  var revision = _ref4.revision;
172
- return revision === 'fy25.02';
174
+ return revision === mostRecentVCRevision;
173
175
  });
174
176
  if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
175
177
  postInteractionFinishVCClean = true;
@@ -1,5 +1,6 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import coinflip from '../coinflip';
2
- import { getConfig, getPostInteractionRate } from '../config';
3
+ import { getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
3
4
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
4
5
  import { getReactUFOPayloadVersion } from '../create-payload/utils/get-react-ufo-payload-version';
5
6
  import { getPageVisibilityState } from '../hidden-timing';
@@ -135,12 +136,13 @@ function createPostInteractionLogPayload({
135
136
  const lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
136
137
  const lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
137
138
  const lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
139
+ const mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : 'fy25.02';
138
140
  let lastInteractionFinishVC90 = null;
139
141
  let lastInteractionFinishVCClean = false;
140
142
  const lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
141
143
  const lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(({
142
144
  revision
143
- }) => revision === 'fy25.02');
145
+ }) => revision === mostRecentVCRevision);
144
146
  if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
145
147
  var _lastInteractionFinis;
146
148
  lastInteractionFinishVCClean = true;
@@ -153,7 +155,7 @@ function createPostInteractionLogPayload({
153
155
  const postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
154
156
  const postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(({
155
157
  revision
156
- }) => revision === 'fy25.02');
158
+ }) => revision === mostRecentVCRevision);
157
159
  if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
158
160
  postInteractionFinishVCClean = true;
159
161
  postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
@@ -2,8 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import coinflip from '../coinflip';
6
- import { getConfig, getPostInteractionRate } from '../config';
7
+ import { getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
7
8
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
8
9
  import { getReactUFOPayloadVersion } from '../create-payload/utils/get-react-ufo-payload-version';
9
10
  import { getPageVisibilityState } from '../hidden-timing';
@@ -143,12 +144,13 @@ function createPostInteractionLogPayload(_ref2) {
143
144
  var lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
144
145
  var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
145
146
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
147
+ var mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : 'fy25.02';
146
148
  var lastInteractionFinishVC90 = null;
147
149
  var lastInteractionFinishVCClean = false;
148
150
  var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
149
151
  var lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(function (_ref3) {
150
152
  var revision = _ref3.revision;
151
- return revision === 'fy25.02';
153
+ return revision === mostRecentVCRevision;
152
154
  });
153
155
  if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
154
156
  var _lastInteractionFinis;
@@ -162,7 +164,7 @@ function createPostInteractionLogPayload(_ref2) {
162
164
  var postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
163
165
  var postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(function (_ref4) {
164
166
  var revision = _ref4.revision;
165
- return revision === 'fy25.02';
167
+ return revision === mostRecentVCRevision;
166
168
  });
167
169
  if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
168
170
  postInteractionFinishVCClean = true;
@@ -174,7 +174,7 @@ export type ReactUFOPayload = {
174
174
  };
175
175
  };
176
176
  };
177
- type LateElement = {
177
+ export type LateMutation = {
178
178
  time: number;
179
179
  element: string;
180
180
  viewportHeatmapPercentage: number;
@@ -213,7 +213,7 @@ export type PostInteractionLogPayload = {
213
213
  revisedTtai: number;
214
214
  revisedVC90: number;
215
215
  vcClean: boolean;
216
- lateMutations: LateElement[];
216
+ lateMutations: LateMutation[];
217
217
  reactProfilerTimings: ReactProfilerTiming[];
218
218
  };
219
219
  };
@@ -1,5 +1,5 @@
1
1
  import type { LastInteractionFinishInfo } from '../common';
2
+ import { LateMutation } from '../common/react-ufo-payload-schema';
2
3
  import type { RevisionPayloadVCDetails } from '../common/vc/types';
3
- import type { LateMutation } from './types';
4
4
  declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios: Record<string, number>): LateMutation[];
5
5
  export default getLateMutations;
@@ -1,5 +1,5 @@
1
1
  import { type PostInteractionLogOutput } from '../common';
2
- import type { LateMutation } from './types';
2
+ import { LateMutation } from '../common/react-ufo-payload-schema';
3
3
  declare function createPostInteractionLogPayload({ lastInteractionFinish, reactProfilerTimings, lastInteractionFinishVCResult, postInteractionFinishVCResult, }: PostInteractionLogOutput): {
4
4
  actionSubject: string;
5
5
  action: string;
@@ -176,7 +176,7 @@ export type ReactUFOPayload = {
176
176
  };
177
177
  };
178
178
  };
179
- type LateElement = {
179
+ export type LateMutation = {
180
180
  time: number;
181
181
  element: string;
182
182
  viewportHeatmapPercentage: number;
@@ -217,7 +217,7 @@ export type PostInteractionLogPayload = {
217
217
  revisedTtai: number;
218
218
  revisedVC90: number;
219
219
  vcClean: boolean;
220
- lateMutations: LateElement[];
220
+ lateMutations: LateMutation[];
221
221
  reactProfilerTimings: ReactProfilerTiming[];
222
222
  };
223
223
  };
@@ -1,5 +1,5 @@
1
1
  import type { LastInteractionFinishInfo } from '../common';
2
+ import { LateMutation } from '../common/react-ufo-payload-schema';
2
3
  import type { RevisionPayloadVCDetails } from '../common/vc/types';
3
- import type { LateMutation } from './types';
4
4
  declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios: Record<string, number>): LateMutation[];
5
5
  export default getLateMutations;
@@ -1,5 +1,5 @@
1
1
  import { type PostInteractionLogOutput } from '../common';
2
- import type { LateMutation } from './types';
2
+ import { LateMutation } from '../common/react-ufo-payload-schema';
3
3
  declare function createPostInteractionLogPayload({ lastInteractionFinish, reactProfilerTimings, lastInteractionFinishVCResult, postInteractionFinishVCResult, }: PostInteractionLogOutput): {
4
4
  actionSubject: string;
5
5
  action: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.13.24",
3
+ "version": "3.13.25",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -180,6 +180,9 @@
180
180
  },
181
181
  "platform_ufo_enable_interactivity_jsm": {
182
182
  "type": "boolean"
183
+ },
184
+ "platform_ufo_post_interaction_most_recent_vc_rev": {
185
+ "type": "boolean"
183
186
  }
184
187
  }
185
188
  }
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,5 +0,0 @@
1
- export type LateMutation = {
2
- time: number;
3
- element: string;
4
- viewportHeatmapPercentage: number;
5
- };
@@ -1,5 +0,0 @@
1
- export type LateMutation = {
2
- time: number;
3
- element: string;
4
- viewportHeatmapPercentage: number;
5
- };