@atlaskit/react-ufo 4.1.0 → 4.1.2

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,21 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#188412](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/188412)
8
+ [`4c4fdba396a9f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4c4fdba396a9f) -
9
+ Clean up fg for unknown elements
10
+
11
+ ## 4.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#187972](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187972)
16
+ [`fff3f06f3e5e1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fff3f06f3e5e1) -
17
+ FG cleanup - platform_ufo_emit_vc_debug_data
18
+
3
19
  ## 4.1.0
4
20
 
5
21
  ### Minor Changes
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.setInteractionPerformanceEvent = exports.getPerformanceObserver = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var _interactionMetrics = require("../interaction-metrics");
11
10
  var _getUniqueElementName = _interopRequireDefault(require("../vc/vc-observer-new/get-unique-element-name"));
12
11
  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; }
@@ -104,7 +103,7 @@ var setInteractionPerformanceEvent = exports.setInteractionPerformanceEvent = fu
104
103
  experimentalInputToNextPaint: ((_interaction$responsi2 = interaction.responsiveness) === null || _interaction$responsi2 === void 0 ? void 0 : _interaction$responsi2.experimentalInputToNextPaint) || entry.duration,
105
104
  inputDelay: ((_interaction$responsi3 = interaction.responsiveness) === null || _interaction$responsi3 === void 0 ? void 0 : _interaction$responsi3.inputDelay) || entry.processingStart - entry.startTime
106
105
  });
107
- if (interaction.ufoName === 'unknown' && (0, _platformFeatureFlags.fg)('platform_ufo_enable_unknown_interactions_elements')) {
106
+ if (interaction.ufoName === 'unknown') {
108
107
  if (entry.target) {
109
108
  var componentHierarchy = getReactComponentHierarchy(entry.target);
110
109
  interaction.unknownElementHierarchy = componentHierarchy;
@@ -13,7 +13,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
15
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _config = require("../../config");
18
17
  var _interactionMetrics = require("../../interaction-metrics");
19
18
  var _attachAbortListeners = require("./attachAbortListeners");
@@ -275,7 +274,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
275
274
  }
276
275
  if (!_this.isPostInteraction) {
277
276
  // Only create revision debug details if callbacks exist
278
- shouldCreateDebugDetails = typeof window.__ufo_devtool_onVCRevisionReady__ === 'function' || typeof window.__on_ufo_vc_debug_data_ready === 'function' && (0, _platformFeatureFlags.fg)('platform_ufo_emit_vc_debug_data');
277
+ shouldCreateDebugDetails = typeof window.__ufo_devtool_onVCRevisionReady__ === 'function' || typeof window.__on_ufo_vc_debug_data_ready === 'function';
279
278
  if (shouldCreateDebugDetails) {
280
279
  v1RevisionDebugDetails = (0, _getVCRevisionDebugDetails.getVCRevisionDebugDetails)({
281
280
  revision: 'fy25.01',
@@ -302,7 +301,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
302
301
  // Handle v2
303
302
  (_window$__ufo_devtool2 = (_window2 = window).__ufo_devtool_onVCRevisionReady__) === null || _window$__ufo_devtool2 === void 0 || _window$__ufo_devtool2.call(_window2, v2RevisionDebugDetails);
304
303
  }
305
- if (typeof window.__on_ufo_vc_debug_data_ready === 'function' && (0, _platformFeatureFlags.fg)('platform_ufo_emit_vc_debug_data')) {
304
+ if (typeof window.__on_ufo_vc_debug_data_ready === 'function') {
306
305
  if (!isTTVCv1Disabled) {
307
306
  (_window$__on_ufo_vc_d = (_window3 = window).__on_ufo_vc_debug_data_ready) === null || _window$__on_ufo_vc_d === void 0 || _window$__on_ufo_vc_d.call(_window3, v1RevisionDebugDetails);
308
307
  }
@@ -181,7 +181,7 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
181
181
  viewportPercentage: log.viewportPercentage
182
182
  });
183
183
  }) : []; // Only calculate enhanced debug details if devtool callbacks exist
184
- shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function' && (0, _platformFeatureFlags.fg)('platform_ufo_emit_vc_debug_data'));
184
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
185
185
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
186
186
  // Pre-sort vcLogs by time for efficient lookups
187
187
  sortedVcLogs = (0, _toConsumableArray2.default)(vcLogs).sort(function (a, b) {
@@ -292,7 +292,7 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
292
292
  console.error('Error in onVCRevisionReady', e);
293
293
  }
294
294
  }
295
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && (0, _platformFeatureFlags.fg)('platform_ufo_emit_vc_debug_data')) {
295
+ if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function') {
296
296
  try {
297
297
  (_window6 = window) === null || _window6 === void 0 || (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 || _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
298
298
  } catch (e) {
@@ -1,4 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import { getActiveInteraction } from '../interaction-metrics';
3
2
  import getElementName from '../vc/vc-observer-new/get-unique-element-name';
4
3
  let performanceEventObserver;
@@ -81,7 +80,7 @@ export const setInteractionPerformanceEvent = entry => {
81
80
  experimentalInputToNextPaint: ((_interaction$responsi2 = interaction.responsiveness) === null || _interaction$responsi2 === void 0 ? void 0 : _interaction$responsi2.experimentalInputToNextPaint) || entry.duration,
82
81
  inputDelay: ((_interaction$responsi3 = interaction.responsiveness) === null || _interaction$responsi3 === void 0 ? void 0 : _interaction$responsi3.inputDelay) || entry.processingStart - entry.startTime
83
82
  };
84
- if (interaction.ufoName === 'unknown' && fg('platform_ufo_enable_unknown_interactions_elements')) {
83
+ if (interaction.ufoName === 'unknown') {
85
84
  if (entry.target) {
86
85
  const componentHierarchy = getReactComponentHierarchy(entry.target);
87
86
  interaction.unknownElementHierarchy = componentHierarchy;
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { isVCRevisionEnabled } from '../../config';
4
3
  import { getActiveInteraction } from '../../interaction-metrics';
5
4
  import { attachAbortListeners } from './attachAbortListeners';
@@ -285,7 +284,7 @@ export class VCObserver {
285
284
  }
286
285
  if (!this.isPostInteraction) {
287
286
  // Only create revision debug details if callbacks exist
288
- const shouldCreateDebugDetails = typeof window.__ufo_devtool_onVCRevisionReady__ === 'function' || typeof window.__on_ufo_vc_debug_data_ready === 'function' && fg('platform_ufo_emit_vc_debug_data');
287
+ const shouldCreateDebugDetails = typeof window.__ufo_devtool_onVCRevisionReady__ === 'function' || typeof window.__on_ufo_vc_debug_data_ready === 'function';
289
288
  if (shouldCreateDebugDetails) {
290
289
  const v1RevisionDebugDetails = getVCRevisionDebugDetails({
291
290
  revision: 'fy25.01',
@@ -316,7 +315,7 @@ export class VCObserver {
316
315
  // Handle v2
317
316
  (_window$__ufo_devtool2 = (_window2 = window).__ufo_devtool_onVCRevisionReady__) === null || _window$__ufo_devtool2 === void 0 ? void 0 : _window$__ufo_devtool2.call(_window2, v2RevisionDebugDetails);
318
317
  }
319
- if (typeof window.__on_ufo_vc_debug_data_ready === 'function' && fg('platform_ufo_emit_vc_debug_data')) {
318
+ if (typeof window.__on_ufo_vc_debug_data_ready === 'function') {
320
319
  var _window$__on_ufo_vc_d2, _window4;
321
320
  if (!isTTVCv1Disabled) {
322
321
  var _window$__on_ufo_vc_d, _window3;
@@ -109,7 +109,7 @@ export default class AbstractVCCalculatorBase {
109
109
  })) : [];
110
110
 
111
111
  // Only calculate enhanced debug details if devtool callbacks exist
112
- const shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function' && fg('platform_ufo_emit_vc_debug_data'));
112
+ const shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
113
113
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
114
114
  // Pre-sort vcLogs by time for efficient lookups
115
115
  const sortedVcLogs = [...vcLogs].sort((a, b) => a.time - b.time);
@@ -199,7 +199,7 @@ export default class AbstractVCCalculatorBase {
199
199
  console.error('Error in onVCRevisionReady', e);
200
200
  }
201
201
  }
202
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && fg('platform_ufo_emit_vc_debug_data')) {
202
+ if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function') {
203
203
  try {
204
204
  var _window6, _window6$__on_ufo_vc_;
205
205
  (_window6 = window) === null || _window6 === void 0 ? void 0 : (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 ? void 0 : _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  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; } } }; }
5
5
  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; } }
6
6
  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; }
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { getActiveInteraction } from '../interaction-metrics';
9
8
  import getElementName from '../vc/vc-observer-new/get-unique-element-name';
10
9
  var performanceEventObserver;
@@ -97,7 +96,7 @@ export var setInteractionPerformanceEvent = function setInteractionPerformanceEv
97
96
  experimentalInputToNextPaint: ((_interaction$responsi2 = interaction.responsiveness) === null || _interaction$responsi2 === void 0 ? void 0 : _interaction$responsi2.experimentalInputToNextPaint) || entry.duration,
98
97
  inputDelay: ((_interaction$responsi3 = interaction.responsiveness) === null || _interaction$responsi3 === void 0 ? void 0 : _interaction$responsi3.inputDelay) || entry.processingStart - entry.startTime
99
98
  });
100
- if (interaction.ufoName === 'unknown' && fg('platform_ufo_enable_unknown_interactions_elements')) {
99
+ if (interaction.ufoName === 'unknown') {
101
100
  if (entry.target) {
102
101
  var componentHierarchy = getReactComponentHierarchy(entry.target);
103
102
  interaction.unknownElementHierarchy = componentHierarchy;
@@ -9,7 +9,6 @@ var _excluded = ["__debug__element"];
9
9
  import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  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; }
11
11
  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; }
12
- import { fg } from '@atlaskit/platform-feature-flags';
13
12
  import { isVCRevisionEnabled } from '../../config';
14
13
  import { getActiveInteraction } from '../../interaction-metrics';
15
14
  import { attachAbortListeners } from './attachAbortListeners';
@@ -268,7 +267,7 @@ export var VCObserver = /*#__PURE__*/function () {
268
267
  }
269
268
  if (!_this.isPostInteraction) {
270
269
  // Only create revision debug details if callbacks exist
271
- shouldCreateDebugDetails = typeof window.__ufo_devtool_onVCRevisionReady__ === 'function' || typeof window.__on_ufo_vc_debug_data_ready === 'function' && fg('platform_ufo_emit_vc_debug_data');
270
+ shouldCreateDebugDetails = typeof window.__ufo_devtool_onVCRevisionReady__ === 'function' || typeof window.__on_ufo_vc_debug_data_ready === 'function';
272
271
  if (shouldCreateDebugDetails) {
273
272
  v1RevisionDebugDetails = getVCRevisionDebugDetails({
274
273
  revision: 'fy25.01',
@@ -295,7 +294,7 @@ export var VCObserver = /*#__PURE__*/function () {
295
294
  // Handle v2
296
295
  (_window$__ufo_devtool2 = (_window2 = window).__ufo_devtool_onVCRevisionReady__) === null || _window$__ufo_devtool2 === void 0 || _window$__ufo_devtool2.call(_window2, v2RevisionDebugDetails);
297
296
  }
298
- if (typeof window.__on_ufo_vc_debug_data_ready === 'function' && fg('platform_ufo_emit_vc_debug_data')) {
297
+ if (typeof window.__on_ufo_vc_debug_data_ready === 'function') {
299
298
  if (!isTTVCv1Disabled) {
300
299
  (_window$__on_ufo_vc_d = (_window3 = window).__on_ufo_vc_debug_data_ready) === null || _window$__on_ufo_vc_d === void 0 || _window$__on_ufo_vc_d.call(_window3, v1RevisionDebugDetails);
301
300
  }
@@ -175,7 +175,7 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
175
175
  viewportPercentage: log.viewportPercentage
176
176
  });
177
177
  }) : []; // Only calculate enhanced debug details if devtool callbacks exist
178
- shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function' && fg('platform_ufo_emit_vc_debug_data'));
178
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
179
179
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
180
180
  // Pre-sort vcLogs by time for efficient lookups
181
181
  sortedVcLogs = _toConsumableArray(vcLogs).sort(function (a, b) {
@@ -286,7 +286,7 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
286
286
  console.error('Error in onVCRevisionReady', e);
287
287
  }
288
288
  }
289
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && fg('platform_ufo_emit_vc_debug_data')) {
289
+ if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function') {
290
290
  try {
291
291
  (_window6 = window) === null || _window6 === void 0 || (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 || _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
292
292
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -135,9 +135,6 @@
135
135
  "platform_ufo_enable_media_for_ttvc_v3": {
136
136
  "type": "boolean"
137
137
  },
138
- "platform_ufo_emit_vc_debug_data": {
139
- "type": "boolean"
140
- },
141
138
  "ufo_return_relative_request_start": {
142
139
  "type": "boolean"
143
140
  },
@@ -186,9 +183,6 @@
186
183
  "platform_ufo_ignore_extra_attributes": {
187
184
  "type": "boolean"
188
185
  },
189
- "platform_ufo_enable_unknown_interactions_elements": {
190
- "type": "boolean"
191
- },
192
186
  "platform_ufo_exclude_3p_elements_from_ttai": {
193
187
  "type": "boolean"
194
188
  },