@atlaskit/react-ufo 4.4.1 → 4.4.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,12 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`896ce28eae730`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/896ce28eae730) -
8
+ experiment on removing abort by new interactions in confluence
9
+
3
10
  ## 4.4.1
4
11
 
5
12
  ### Patch Changes
@@ -50,6 +50,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
50
50
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
51
51
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
52
52
  var _uuid = require("uuid");
53
+ var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
53
54
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
54
55
  var _coinflip = _interopRequireDefault(require("../coinflip"));
55
56
  var _config = require("../config");
@@ -846,6 +847,16 @@ function callCancelCallbacks(interaction) {
846
847
  });
847
848
  }
848
849
  function abort(interactionId, abortReason) {
850
+ var _FeatureGates$getExpe;
851
+ var activeInteraction = getActiveInteraction();
852
+ if (
853
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
854
+ abortReason === 'new_interaction' && (0, _platformFeatureFlags.fg)('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
855
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
856
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
857
+ (_FeatureGates$getExpe = _featureGateJsClient.default.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe !== void 0 && _FeatureGates$getExpe.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
858
+ return;
859
+ }
849
860
  var interaction = _constants.interactions.get(interactionId);
850
861
  if (interaction != null) {
851
862
  callCancelCallbacks(interaction);
@@ -860,6 +871,16 @@ function abort(interactionId, abortReason) {
860
871
  }
861
872
  }
862
873
  function abortByNewInteraction(interactionId, interactionName) {
874
+ var _FeatureGates$getExpe2;
875
+ var activeInteraction = getActiveInteraction();
876
+ if (
877
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
878
+ (0, _platformFeatureFlags.fg)('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
879
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
880
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
881
+ (_FeatureGates$getExpe2 = _featureGateJsClient.default.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe2 !== void 0 && _FeatureGates$getExpe2.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
882
+ return;
883
+ }
863
884
  var interaction = _constants.interactions.get(interactionId);
864
885
  if (interaction != null) {
865
886
  callCancelCallbacks(interaction);
@@ -875,6 +896,16 @@ function abortByNewInteraction(interactionId, interactionName) {
875
896
  }
876
897
  }
877
898
  function abortAll(abortReason, abortedByInteractionName) {
899
+ var _FeatureGates$getExpe3;
900
+ var activeInteraction = getActiveInteraction();
901
+ if (
902
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
903
+ abortReason === 'new_interaction' && (0, _platformFeatureFlags.fg)('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
904
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
905
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
906
+ (_FeatureGates$getExpe3 = _featureGateJsClient.default.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe3 !== void 0 && _FeatureGates$getExpe3.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
907
+ return;
908
+ }
878
909
  _constants.interactions.forEach(function (interaction, interactionId) {
879
910
  var noMoreHolds = interaction.holdActive.size === 0;
880
911
  if (!noMoreHolds) {
@@ -1,4 +1,5 @@
1
1
  import { v4 as createUUID } from 'uuid';
2
+ import FeatureGates from '@atlaskit/feature-gate-js-client';
2
3
  import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import coinflip from '../coinflip';
4
5
  import { getAwaitBM3TTIList, getCapabilityRate, getConfig, getExperimentalInteractionRate, getInteractionTimeout, getPostInteractionRate, getReactHydrationStats } from '../config';
@@ -722,6 +723,16 @@ function callCancelCallbacks(interaction) {
722
723
  });
723
724
  }
724
725
  export function abort(interactionId, abortReason) {
726
+ var _FeatureGates$getExpe;
727
+ const activeInteraction = getActiveInteraction();
728
+ if (
729
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
730
+ abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
731
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
732
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
733
+ (_FeatureGates$getExpe = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe !== void 0 && _FeatureGates$getExpe.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
734
+ return;
735
+ }
725
736
  const interaction = interactions.get(interactionId);
726
737
  if (interaction != null) {
727
738
  callCancelCallbacks(interaction);
@@ -736,6 +747,16 @@ export function abort(interactionId, abortReason) {
736
747
  }
737
748
  }
738
749
  export function abortByNewInteraction(interactionId, interactionName) {
750
+ var _FeatureGates$getExpe2;
751
+ const activeInteraction = getActiveInteraction();
752
+ if (
753
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
754
+ fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
755
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
756
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
757
+ (_FeatureGates$getExpe2 = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe2 !== void 0 && _FeatureGates$getExpe2.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
758
+ return;
759
+ }
739
760
  const interaction = interactions.get(interactionId);
740
761
  if (interaction != null) {
741
762
  callCancelCallbacks(interaction);
@@ -751,6 +772,16 @@ export function abortByNewInteraction(interactionId, interactionName) {
751
772
  }
752
773
  }
753
774
  export function abortAll(abortReason, abortedByInteractionName) {
775
+ var _FeatureGates$getExpe3;
776
+ const activeInteraction = getActiveInteraction();
777
+ if (
778
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
779
+ abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
780
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
781
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
782
+ (_FeatureGates$getExpe3 = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe3 !== void 0 && _FeatureGates$getExpe3.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
783
+ return;
784
+ }
754
785
  interactions.forEach((interaction, interactionId) => {
755
786
  const noMoreHolds = interaction.holdActive.size === 0;
756
787
  if (!noMoreHolds) {
@@ -9,6 +9,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
9
9
  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; } }
10
10
  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; }
11
11
  import { v4 as createUUID } from 'uuid';
12
+ import FeatureGates from '@atlaskit/feature-gate-js-client';
12
13
  import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import coinflip from '../coinflip';
14
15
  import { getAwaitBM3TTIList, getCapabilityRate, getConfig, getExperimentalInteractionRate, getInteractionTimeout, getPostInteractionRate, getReactHydrationStats } from '../config';
@@ -800,6 +801,16 @@ function callCancelCallbacks(interaction) {
800
801
  });
801
802
  }
802
803
  export function abort(interactionId, abortReason) {
804
+ var _FeatureGates$getExpe;
805
+ var activeInteraction = getActiveInteraction();
806
+ if (
807
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
808
+ abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
809
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
810
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
811
+ (_FeatureGates$getExpe = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe !== void 0 && _FeatureGates$getExpe.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
812
+ return;
813
+ }
803
814
  var interaction = interactions.get(interactionId);
804
815
  if (interaction != null) {
805
816
  callCancelCallbacks(interaction);
@@ -814,6 +825,16 @@ export function abort(interactionId, abortReason) {
814
825
  }
815
826
  }
816
827
  export function abortByNewInteraction(interactionId, interactionName) {
828
+ var _FeatureGates$getExpe2;
829
+ var activeInteraction = getActiveInteraction();
830
+ if (
831
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
832
+ fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
833
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
834
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
835
+ (_FeatureGates$getExpe2 = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe2 !== void 0 && _FeatureGates$getExpe2.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
836
+ return;
837
+ }
817
838
  var interaction = interactions.get(interactionId);
818
839
  if (interaction != null) {
819
840
  callCancelCallbacks(interaction);
@@ -829,6 +850,16 @@ export function abortByNewInteraction(interactionId, interactionName) {
829
850
  }
830
851
  }
831
852
  export function abortAll(abortReason, abortedByInteractionName) {
853
+ var _FeatureGates$getExpe3;
854
+ var activeInteraction = getActiveInteraction();
855
+ if (
856
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
857
+ abortReason === 'new_interaction' && fg('ufo_targeting_confluence_hello') && // list of enabled experiences managed in switcheroo/statsig
858
+ // ignoring as per https://atlassian.slack.com/archives/C026LTWFZ47/p1752798490250649
859
+ // eslint-disable-next-line @atlaskit/platform/use-recommended-utils
860
+ (_FeatureGates$getExpe3 = FeatureGates.getExperimentValue('ufo_disable_aborted_new_interaction_on_confluence', 'enabledExperiences', [])) !== null && _FeatureGates$getExpe3 !== void 0 && _FeatureGates$getExpe3.includes((activeInteraction === null || activeInteraction === void 0 ? void 0 : activeInteraction.ufoName) || '')) {
861
+ return;
862
+ }
832
863
  interactions.forEach(function (interaction, interactionId) {
833
864
  var noMoreHolds = interaction.holdActive.size === 0;
834
865
  if (!noMoreHolds) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -76,6 +76,7 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@atlaskit/browser-apis": "^0.0.1",
79
+ "@atlaskit/feature-gate-js-client": "^5.5.0",
79
80
  "@atlaskit/interaction-context": "^3.0.0",
80
81
  "@atlaskit/platform-feature-flags": "^1.1.0",
81
82
  "@babel/runtime": "^7.0.0",
@@ -135,6 +136,9 @@
135
136
  "platform_ufo_enable_media_for_ttvc_v3": {
136
137
  "type": "boolean"
137
138
  },
139
+ "ufo_targeting_confluence_hello": {
140
+ "type": "boolean"
141
+ },
138
142
  "platform_ufo_remove_deprecated_config_fields": {
139
143
  "type": "boolean"
140
144
  },