@atlaskit/react-ufo 5.4.3 → 5.4.5

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,19 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 5.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0f2580ac07d48`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f2580ac07d48) -
8
+ Clean up ufo_update_and_enforce_ttvc_v4_default_version feature gate (always true)
9
+
10
+ ## 5.4.4
11
+
12
+ ### Patch Changes
13
+
14
+ - [`4e77d43cefd28`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4e77d43cefd28) -
15
+ Bring back the displayName that was removed from the UFOLabel
16
+
3
17
  ## 5.4.3
4
18
 
5
19
  ### Patch Changes
@@ -37,7 +37,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
37
37
  var config;
38
38
  var DEFAULT_TTVC_REVISION = exports.DEFAULT_TTVC_REVISION = 'fy26.04';
39
39
  function getDefaultTTVCRevision() {
40
- return (0, _platformFeatureFlags.fg)('ufo_update_and_enforce_ttvc_v4_default_version') ? DEFAULT_TTVC_REVISION : 'fy25.03';
40
+ return DEFAULT_TTVC_REVISION;
41
41
  }
42
42
  var UNKNOWN_INTERACTION_RATE = exports.UNKNOWN_INTERACTION_RATE = 1000;
43
43
 
@@ -49,7 +49,7 @@ function setUFOConfig(newConfig) {
49
49
  // Handle edge cases with `enabledVCRevisions`
50
50
  var _ref = (_newConfig$vc = newConfig === null || newConfig === void 0 ? void 0 : newConfig.vc) !== null && _newConfig$vc !== void 0 ? _newConfig$vc : {},
51
51
  enabledVCRevisions = _ref.enabledVCRevisions;
52
- if ((0, _platformFeatureFlags.fg)('ufo_update_and_enforce_ttvc_v4_default_version') ? enabledVCRevisions : (0, _typeof2.default)(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience) === 'object') {
52
+ if (enabledVCRevisions) {
53
53
  var _enabledVCRevisions$a;
54
54
  var byExperience = (0, _typeof2.default)(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience) === 'object' ? enabledVCRevisions.byExperience : {};
55
55
  config = _objectSpread(_objectSpread({}, newConfig), {}, {
@@ -86,7 +86,7 @@ function _createInteractionExtraLogPayload() {
86
86
  finalVCMetrics = _context.sent;
87
87
  // Check if VC is clean and has valid metric
88
88
  vcRevisionPayload = finalVCMetrics === null || finalVCMetrics === void 0 ? void 0 : finalVCMetrics['ufo:vc:rev'];
89
- effectiveRevision = (0, _platformFeatureFlags.fg)('ufo_update_and_enforce_ttvc_v4_default_version') ? (_getMostRecentVCRevis = (0, _config2.getMostRecentVCRevision)(ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : _config2.DEFAULT_TTVC_REVISION : (0, _config2.getDefaultTTVCRevision)();
89
+ effectiveRevision = (_getMostRecentVCRevis = (0, _config2.getMostRecentVCRevision)(ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : _config2.DEFAULT_TTVC_REVISION;
90
90
  effectiveVCRevisionPayload = vcRevisionPayload === null || vcRevisionPayload === void 0 ? void 0 : vcRevisionPayload.find(function (_ref) {
91
91
  var revision = _ref.revision;
92
92
  return revision === effectiveRevision;
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = UFOLabel;
8
+ exports.default = void 0;
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _react = _interopRequireWildcard(require("react"));
@@ -21,7 +21,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
21
21
  * </UFOLabel>
22
22
  * ```
23
23
  */
24
- function UFOLabel(_ref) {
24
+ var UFOLabel = function UFOLabel(_ref) {
25
25
  var name = _ref.name,
26
26
  children = _ref.children;
27
27
  var context = (0, _interactionContext.useInteractionContext)();
@@ -41,4 +41,6 @@ function UFOLabel(_ref) {
41
41
  return context ? /*#__PURE__*/_react.default.createElement(_interactionContext.default.Provider, {
42
42
  value: newContext
43
43
  }, children) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
44
- }
44
+ };
45
+ UFOLabel.displayName = 'UFOLabel';
46
+ var _default = exports.default = UFOLabel;
@@ -2,7 +2,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
2
2
  let config;
3
3
  export const DEFAULT_TTVC_REVISION = 'fy26.04';
4
4
  export function getDefaultTTVCRevision() {
5
- return fg('ufo_update_and_enforce_ttvc_v4_default_version') ? DEFAULT_TTVC_REVISION : 'fy25.03';
5
+ return DEFAULT_TTVC_REVISION;
6
6
  }
7
7
  export const UNKNOWN_INTERACTION_RATE = 1000;
8
8
 
@@ -15,7 +15,7 @@ export function setUFOConfig(newConfig) {
15
15
  const {
16
16
  enabledVCRevisions
17
17
  } = (_newConfig$vc = newConfig === null || newConfig === void 0 ? void 0 : newConfig.vc) !== null && _newConfig$vc !== void 0 ? _newConfig$vc : {};
18
- if (fg('ufo_update_and_enforce_ttvc_v4_default_version') ? enabledVCRevisions : typeof (enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience) === 'object') {
18
+ if (enabledVCRevisions) {
19
19
  var _enabledVCRevisions$a;
20
20
  const byExperience = typeof (enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience) === 'object' ? enabledVCRevisions.byExperience : {};
21
21
  config = {
@@ -1,6 +1,6 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import coinflip from '../coinflip';
3
- import { DEFAULT_TTVC_REVISION, getConfig, getDefaultTTVCRevision, getExtraInteractionRate, getMostRecentVCRevision } from '../config';
3
+ import { DEFAULT_TTVC_REVISION, getConfig, getExtraInteractionRate, getMostRecentVCRevision } from '../config';
4
4
  import { buildSegmentTree, getOldSegmentsLabelStack, optimizeLabelStack, sanitizeUfoName } from '../create-payload/common/utils';
5
5
  import { getMoreAccuratePageVisibilityUpToTTAI } from '../create-payload/utils/get-more-accurate-page-visibility-up-to-ttai';
6
6
  import getPageVisibilityUpToTTAI from '../create-payload/utils/get-page-visibility-up-to-ttai';
@@ -62,7 +62,7 @@ async function createInteractionExtraLogPayload(interactionId, interaction, last
62
62
 
63
63
  // Check if VC is clean and has valid metric
64
64
  const vcRevisionPayload = finalVCMetrics === null || finalVCMetrics === void 0 ? void 0 : finalVCMetrics['ufo:vc:rev'];
65
- const effectiveRevision = fg('ufo_update_and_enforce_ttvc_v4_default_version') ? (_getMostRecentVCRevis = getMostRecentVCRevision(ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : DEFAULT_TTVC_REVISION : getDefaultTTVCRevision();
65
+ const effectiveRevision = (_getMostRecentVCRevis = getMostRecentVCRevision(ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : DEFAULT_TTVC_REVISION;
66
66
  const effectiveVCRevisionPayload = vcRevisionPayload === null || vcRevisionPayload === void 0 ? void 0 : vcRevisionPayload.find(({
67
67
  revision
68
68
  }) => revision === effectiveRevision);
@@ -9,10 +9,10 @@ import InteractionContext, { useInteractionContext } from '../interaction-contex
9
9
  * </UFOLabel>
10
10
  * ```
11
11
  */
12
- export default function UFOLabel({
12
+ const UFOLabel = ({
13
13
  name,
14
14
  children
15
- }) {
15
+ }) => {
16
16
  const context = useInteractionContext();
17
17
  const newContext = useMemo(() => {
18
18
  if (context) {
@@ -31,4 +31,6 @@ export default function UFOLabel({
31
31
  return context ? /*#__PURE__*/React.createElement(InteractionContext.Provider, {
32
32
  value: newContext
33
33
  }, children) : /*#__PURE__*/React.createElement(React.Fragment, null, children);
34
- }
34
+ };
35
+ UFOLabel.displayName = 'UFOLabel';
36
+ export default UFOLabel;
@@ -7,7 +7,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
7
7
  var config;
8
8
  export var DEFAULT_TTVC_REVISION = 'fy26.04';
9
9
  export function getDefaultTTVCRevision() {
10
- return fg('ufo_update_and_enforce_ttvc_v4_default_version') ? DEFAULT_TTVC_REVISION : 'fy25.03';
10
+ return DEFAULT_TTVC_REVISION;
11
11
  }
12
12
  export var UNKNOWN_INTERACTION_RATE = 1000;
13
13
 
@@ -19,7 +19,7 @@ export function setUFOConfig(newConfig) {
19
19
  // Handle edge cases with `enabledVCRevisions`
20
20
  var _ref = (_newConfig$vc = newConfig === null || newConfig === void 0 ? void 0 : newConfig.vc) !== null && _newConfig$vc !== void 0 ? _newConfig$vc : {},
21
21
  enabledVCRevisions = _ref.enabledVCRevisions;
22
- if (fg('ufo_update_and_enforce_ttvc_v4_default_version') ? enabledVCRevisions : _typeof(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience) === 'object') {
22
+ if (enabledVCRevisions) {
23
23
  var _enabledVCRevisions$a;
24
24
  var byExperience = _typeof(enabledVCRevisions === null || enabledVCRevisions === void 0 ? void 0 : enabledVCRevisions.byExperience) === 'object' ? enabledVCRevisions.byExperience : {};
25
25
  config = _objectSpread(_objectSpread({}, newConfig), {}, {
@@ -8,7 +8,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
8
8
  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; }
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import coinflip from '../coinflip';
11
- import { DEFAULT_TTVC_REVISION, getConfig, getDefaultTTVCRevision, getExtraInteractionRate, getMostRecentVCRevision } from '../config';
11
+ import { DEFAULT_TTVC_REVISION, getConfig, getExtraInteractionRate, getMostRecentVCRevision } from '../config';
12
12
  import { buildSegmentTree, getOldSegmentsLabelStack, optimizeLabelStack, sanitizeUfoName } from '../create-payload/common/utils';
13
13
  import { getMoreAccuratePageVisibilityUpToTTAI } from '../create-payload/utils/get-more-accurate-page-visibility-up-to-ttai';
14
14
  import getPageVisibilityUpToTTAI from '../create-payload/utils/get-page-visibility-up-to-ttai';
@@ -79,7 +79,7 @@ function _createInteractionExtraLogPayload() {
79
79
  finalVCMetrics = _context.sent;
80
80
  // Check if VC is clean and has valid metric
81
81
  vcRevisionPayload = finalVCMetrics === null || finalVCMetrics === void 0 ? void 0 : finalVCMetrics['ufo:vc:rev'];
82
- effectiveRevision = fg('ufo_update_and_enforce_ttvc_v4_default_version') ? (_getMostRecentVCRevis = getMostRecentVCRevision(ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : DEFAULT_TTVC_REVISION : getDefaultTTVCRevision();
82
+ effectiveRevision = (_getMostRecentVCRevis = getMostRecentVCRevision(ufoName)) !== null && _getMostRecentVCRevis !== void 0 ? _getMostRecentVCRevis : DEFAULT_TTVC_REVISION;
83
83
  effectiveVCRevisionPayload = vcRevisionPayload === null || vcRevisionPayload === void 0 ? void 0 : vcRevisionPayload.find(function (_ref) {
84
84
  var revision = _ref.revision;
85
85
  return revision === effectiveRevision;
@@ -13,7 +13,7 @@ import InteractionContext, { useInteractionContext } from '../interaction-contex
13
13
  * </UFOLabel>
14
14
  * ```
15
15
  */
16
- export default function UFOLabel(_ref) {
16
+ var UFOLabel = function UFOLabel(_ref) {
17
17
  var name = _ref.name,
18
18
  children = _ref.children;
19
19
  var context = useInteractionContext();
@@ -33,4 +33,6 @@ export default function UFOLabel(_ref) {
33
33
  return context ? /*#__PURE__*/React.createElement(InteractionContext.Provider, {
34
34
  value: newContext
35
35
  }, children) : /*#__PURE__*/React.createElement(React.Fragment, null, children);
36
- }
36
+ };
37
+ UFOLabel.displayName = 'UFOLabel';
38
+ export default UFOLabel;
@@ -7,7 +7,11 @@ import React, { type ReactNode } from 'react';
7
7
  * </UFOLabel>
8
8
  * ```
9
9
  */
10
- export default function UFOLabel({ name, children, }: {
11
- name: string;
12
- children: ReactNode;
13
- }): React.JSX.Element;
10
+ declare const UFOLabel: {
11
+ (props: {
12
+ name: string;
13
+ children: ReactNode;
14
+ }): React.JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export default UFOLabel;
@@ -7,7 +7,11 @@ import React, { type ReactNode } from 'react';
7
7
  * </UFOLabel>
8
8
  * ```
9
9
  */
10
- export default function UFOLabel({ name, children, }: {
11
- name: string;
12
- children: ReactNode;
13
- }): React.JSX.Element;
10
+ declare const UFOLabel: {
11
+ (props: {
12
+ name: string;
13
+ children: ReactNode;
14
+ }): React.JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export default UFOLabel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "5.4.3",
3
+ "version": "5.4.5",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -206,9 +206,6 @@
206
206
  "platform_ufo_enable_killswitch_config": {
207
207
  "type": "boolean"
208
208
  },
209
- "ufo_update_and_enforce_ttvc_v4_default_version": {
210
- "type": "boolean"
211
- },
212
209
  "platform_ufo_page_visibility_timeline": {
213
210
  "type": "boolean"
214
211
  },