@atlaskit/react-ufo 5.5.0 → 5.5.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.
@@ -2,19 +2,12 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["children"];
4
4
  import React from 'react';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
- import UFOIgnoreHolds from '../ignore-holds';
7
5
  import UFOSegment from './segment';
8
6
  export var UFOThirdPartySegment = function UFOThirdPartySegment(props) {
9
7
  var children = props.children,
10
8
  otherProps = _objectWithoutProperties(props, _excluded);
11
- return fg('platform_ufo_enable_ttai_with_3p') ? /*#__PURE__*/React.createElement(UFOSegment, _extends({
9
+ return /*#__PURE__*/React.createElement(UFOSegment, _extends({
12
10
  type: "third-party"
13
- }, otherProps), children) : /*#__PURE__*/React.createElement(UFOSegment, _extends({
14
- type: "third-party"
15
- }, otherProps), /*#__PURE__*/React.createElement(UFOIgnoreHolds, {
16
- ignore: fg('platform_ufo_exclude_3p_elements_from_ttai'),
17
- reason: "third-party-element"
18
- }, children));
11
+ }, otherProps), children);
19
12
  };
20
13
  UFOThirdPartySegment.displayName = 'UFOThirdPartySegment';
@@ -10,7 +10,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  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; } } }; }
11
11
  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; } }
12
12
  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; }
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { calculateTTVCPercentilesWithDebugInfo } from './percentile-calc';
15
14
  import { detectLayoutShiftCause } from './utils/detect-layout-shift-cause';
16
15
  import getViewportHeight from './utils/get-viewport-height';
@@ -247,7 +246,7 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
247
246
  viewportPercentage: log.viewportPercentage
248
247
  });
249
248
  }) : []; // If 3p metric enabled - calculate the debug details
250
- shouldCalculate3p = include3p && fg('platform_ufo_enable_ttai_with_3p'); // Only calculate enhanced debug details if devtool callbacks exist
249
+ shouldCalculate3p = include3p; // Only calculate enhanced debug details if devtool callbacks exist
251
250
  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' || typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_vc_3p_debug_data) === 'function');
252
251
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
253
252
  // Pre-sort vcLogs by time for efficient lookups
@@ -357,22 +357,20 @@ var ViewportObserver = /*#__PURE__*/function () {
357
357
  }
358
358
  };
359
359
  }
360
- if (fg('platform_ufo_exclude_3p_attribute_changes')) {
361
- var _ref0 = _this.enableThirdPartyTracking ? checkWithinComponent(target, 'UFOThirdPartySegment', _this.mapIs3pResult) : {
362
- isWithin: false
363
- },
364
- isWithinThirdPartySegment = _ref0.isWithin;
365
- if (isWithinThirdPartySegment) {
366
- return {
367
- type: 'mutation:third-party-attribute',
368
- mutationData: {
369
- attributeName: attributeName,
370
- oldValue: oldValue,
371
- newValue: newValue,
372
- timestamp: timestamp
373
- }
374
- };
375
- }
360
+ var _ref0 = _this.enableThirdPartyTracking ? checkWithinComponent(target, 'UFOThirdPartySegment', _this.mapIs3pResult) : {
361
+ isWithin: false
362
+ },
363
+ isWithinThirdPartySegment = _ref0.isWithin;
364
+ if (isWithinThirdPartySegment) {
365
+ return {
366
+ type: 'mutation:third-party-attribute',
367
+ mutationData: {
368
+ attributeName: attributeName,
369
+ oldValue: oldValue,
370
+ newValue: newValue,
371
+ timestamp: timestamp
372
+ }
373
+ };
376
374
  }
377
375
  if (_this.shouldCheckSmartAnswersMutations() && isContainedWithinSmartAnswers(target)) {
378
376
  return {
@@ -33,7 +33,7 @@ export declare function addSpanToAll(type: SpanType, name: string, labelStack: L
33
33
  export declare function addPreload(moduleId: string, timestamp: number): void;
34
34
  export declare function addLoad(identifier: string, start: number, end: number): void;
35
35
  export declare function extractModuleName(input: string): string;
36
- export declare function addHold(interactionId: string, labelStack: LabelStack, name: string, experimental: boolean): () => void;
36
+ export declare function addHold(interactionId: string, labelStack: LabelStack, name: string, _experimental: boolean): () => void;
37
37
  export declare function addHoldByID(interactionId: string, labelStack: LabelStack, name: string, id: string, ignoreOnSubmit?: boolean): () => void;
38
38
  export declare function removeHoldByID(interactionId: string, id: string): void;
39
39
  export declare function getCurrentInteractionType(interactionId: string): InteractionType | null;
@@ -33,7 +33,7 @@ export declare function addSpanToAll(type: SpanType, name: string, labelStack: L
33
33
  export declare function addPreload(moduleId: string, timestamp: number): void;
34
34
  export declare function addLoad(identifier: string, start: number, end: number): void;
35
35
  export declare function extractModuleName(input: string): string;
36
- export declare function addHold(interactionId: string, labelStack: LabelStack, name: string, experimental: boolean): () => void;
36
+ export declare function addHold(interactionId: string, labelStack: LabelStack, name: string, _experimental: boolean): () => void;
37
37
  export declare function addHoldByID(interactionId: string, labelStack: LabelStack, name: string, id: string, ignoreOnSubmit?: boolean): () => void;
38
38
  export declare function removeHoldByID(interactionId: string, id: string): void;
39
39
  export declare function getCurrentInteractionType(interactionId: string): InteractionType | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "5.5.0",
3
+ "version": "5.5.2",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -113,9 +113,6 @@
113
113
  "ufo_fix_aborting_interaction_detection_during_ssr": {
114
114
  "type": "boolean"
115
115
  },
116
- "platform_ufo_exclude_3p_elements_from_ttai": {
117
- "type": "boolean"
118
- },
119
116
  "platform_ufo_exclude_3p_elements_from_ttvc": {
120
117
  "type": "boolean"
121
118
  },
@@ -131,9 +128,6 @@
131
128
  "platform_ufo_segment_unmount_count": {
132
129
  "type": "boolean"
133
130
  },
134
- "platform_ufo_enable_ttai_with_3p": {
135
- "type": "boolean"
136
- },
137
131
  "platform_ufo_exclude_3p_extensions_from_ttvc": {
138
132
  "type": "boolean"
139
133
  },
@@ -149,9 +143,6 @@
149
143
  "platform_ufo_ssr_render_profiler": {
150
144
  "type": "boolean"
151
145
  },
152
- "platform_ufo_enable_finish_interaction_transition": {
153
- "type": "boolean"
154
- },
155
146
  "platform_ufo_drop_prior_fg_interactions": {
156
147
  "type": "boolean"
157
148
  },
@@ -164,9 +155,6 @@
164
155
  "react_ufo_battery_info": {
165
156
  "type": "boolean"
166
157
  },
167
- "platform_ufo_exclude_3p_attribute_changes": {
168
- "type": "boolean"
169
- },
170
158
  "platform_ufo_use_native_page_visibility_api": {
171
159
  "type": "boolean"
172
160
  },