@atlaskit/react-ufo 4.12.1 → 4.12.3

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
+ ## 4.12.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5f70b8e74f5f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f70b8e74f5f3) -
8
+ tidy up feature flag platform_editor_tables_scaling_css
9
+
10
+ ## 4.12.2
11
+
12
+ ### Patch Changes
13
+
14
+ - [`62fd2a70c6b2a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/62fd2a70c6b2a) -
15
+ FG cleanup - platform_ufo_vc_next_filter_ls_entries_same_rect
16
+
3
17
  ## 4.12.1
4
18
 
5
19
  ### Patch Changes
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
- var _expVal = require("../../../expVal");
9
8
  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; } } }; }
10
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; } }
11
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; }
@@ -50,9 +49,6 @@ function isDnDStyleMutation(_ref) {
50
49
  if (!(0, _platformFeatureFlags.fg)('platform_editor_exclude_dnd_anchor_name_from_ttvc')) {
51
50
  return false;
52
51
  }
53
- if (!(0, _expVal.expVal)('platform_editor_tables_scaling_css', 'excludeDnD', false)) {
54
- return false;
55
- }
56
52
  if (!(target instanceof Element)) {
57
53
  return false;
58
54
  }
@@ -19,12 +19,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
19
19
  var ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
20
20
  var REVISION_NO = 'fy25.03';
21
21
  var getConsideredEntryTypes = function getConsideredEntryTypes(include3p) {
22
- var entryTypes = ['mutation:child-element', 'mutation:element', 'mutation:attribute', 'layout-shift', 'window:event'];
23
-
24
- // in rolling this out, still include it in TTVC v3
25
- if ((0, _platformFeatureFlags.fg)('platform_ufo_vc_next_filter_ls_entries_same_rect')) {
26
- entryTypes.push('layout-shift:same-rect');
27
- }
22
+ var entryTypes = ['mutation:child-element', 'mutation:element', 'mutation:attribute', 'layout-shift', 'layout-shift:same-rect', 'window:event'];
28
23
 
29
24
  // If not exclude 3p elements from ttvc,
30
25
  // including the tags into the ConsideredEntryTypes so that it won't be ignored for TTVC calculation
@@ -11,7 +11,6 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
11
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _vcUtils = require("../../vc-observer/media-wrapper/vc-utils");
16
15
  var _isDndStyleMutation = _interopRequireDefault(require("../../vc-observer/observers/non-visual-styles/is-dnd-style-mutation"));
17
16
  var _isNonVisualStyleMutation = _interopRequireDefault(require("../../vc-observer/observers/non-visual-styles/is-non-visual-style-mutation"));
@@ -360,26 +359,15 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
360
359
  var changedRect = _step3.value;
361
360
  var target = changedRect.node;
362
361
  if (target) {
363
- if ((0, _platformFeatureFlags.fg)('platform_ufo_vc_next_filter_ls_entries_same_rect')) {
364
- var isSameCurrentAndPreviousRects = (0, _isSameRectDimensions.isSameRectDimensions)(changedRect.rect, changedRect.previousRect);
365
- _this.onChange({
366
- time: time,
367
- elementRef: new WeakRef(target),
368
- visible: true,
369
- rect: changedRect.rect,
370
- previousRect: changedRect.previousRect,
371
- type: isSameCurrentAndPreviousRects ? 'layout-shift:same-rect' : 'layout-shift'
372
- });
373
- } else {
374
- _this.onChange({
375
- time: time,
376
- elementRef: new WeakRef(target),
377
- visible: true,
378
- rect: changedRect.rect,
379
- previousRect: changedRect.previousRect,
380
- type: 'layout-shift'
381
- });
382
- }
362
+ var isSameCurrentAndPreviousRects = (0, _isSameRectDimensions.isSameRectDimensions)(changedRect.rect, changedRect.previousRect);
363
+ _this.onChange({
364
+ time: time,
365
+ elementRef: new WeakRef(target),
366
+ visible: true,
367
+ rect: changedRect.rect,
368
+ previousRect: changedRect.previousRect,
369
+ type: isSameCurrentAndPreviousRects ? 'layout-shift:same-rect' : 'layout-shift'
370
+ });
383
371
  }
384
372
  }
385
373
  } catch (err) {
@@ -1,5 +1,4 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
- import { expVal } from '../../../expVal';
3
2
  const isDnDStyleChange = style => {
4
3
  return style.startsWith('anchor-name: --node-anchor');
5
4
  };
@@ -33,9 +32,6 @@ function isDnDStyleMutation({
33
32
  if (!fg('platform_editor_exclude_dnd_anchor_name_from_ttvc')) {
34
33
  return false;
35
34
  }
36
- if (!expVal('platform_editor_tables_scaling_css', 'excludeDnD', false)) {
37
- return false;
38
- }
39
35
  if (!(target instanceof Element)) {
40
36
  return false;
41
37
  }
@@ -5,12 +5,7 @@ import isViewportEntryData from '../utils/is-viewport-entry-data';
5
5
  const ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
6
6
  const REVISION_NO = 'fy25.03';
7
7
  const getConsideredEntryTypes = include3p => {
8
- const entryTypes = ['mutation:child-element', 'mutation:element', 'mutation:attribute', 'layout-shift', 'window:event'];
9
-
10
- // in rolling this out, still include it in TTVC v3
11
- if (fg('platform_ufo_vc_next_filter_ls_entries_same_rect')) {
12
- entryTypes.push('layout-shift:same-rect');
13
- }
8
+ const entryTypes = ['mutation:child-element', 'mutation:element', 'mutation:attribute', 'layout-shift', 'layout-shift:same-rect', 'window:event'];
14
9
 
15
10
  // If not exclude 3p elements from ttvc,
16
11
  // including the tags into the ConsideredEntryTypes so that it won't be ignored for TTVC calculation
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { isContainedWithinMediaWrapper } from '../../vc-observer/media-wrapper/vc-utils';
4
3
  import isDnDStyleMutation from '../../vc-observer/observers/non-visual-styles/is-dnd-style-mutation';
5
4
  import isNonVisualStyleMutation from '../../vc-observer/observers/non-visual-styles/is-non-visual-style-mutation';
@@ -263,26 +262,15 @@ export default class ViewportObserver {
263
262
  for (const changedRect of changedRects) {
264
263
  const target = changedRect.node;
265
264
  if (target) {
266
- if (fg('platform_ufo_vc_next_filter_ls_entries_same_rect')) {
267
- const isSameCurrentAndPreviousRects = isSameRectDimensions(changedRect.rect, changedRect.previousRect);
268
- this.onChange({
269
- time,
270
- elementRef: new WeakRef(target),
271
- visible: true,
272
- rect: changedRect.rect,
273
- previousRect: changedRect.previousRect,
274
- type: isSameCurrentAndPreviousRects ? 'layout-shift:same-rect' : 'layout-shift'
275
- });
276
- } else {
277
- this.onChange({
278
- time,
279
- elementRef: new WeakRef(target),
280
- visible: true,
281
- rect: changedRect.rect,
282
- previousRect: changedRect.previousRect,
283
- type: 'layout-shift'
284
- });
285
- }
265
+ const isSameCurrentAndPreviousRects = isSameRectDimensions(changedRect.rect, changedRect.previousRect);
266
+ this.onChange({
267
+ time,
268
+ elementRef: new WeakRef(target),
269
+ visible: true,
270
+ rect: changedRect.rect,
271
+ previousRect: changedRect.previousRect,
272
+ type: isSameCurrentAndPreviousRects ? 'layout-shift:same-rect' : 'layout-shift'
273
+ });
286
274
  }
287
275
  }
288
276
  });
@@ -2,7 +2,6 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
2
2
  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; } }
3
3
  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; }
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
- import { expVal } from '../../../expVal';
6
5
  var isDnDStyleChange = function isDnDStyleChange(style) {
7
6
  return style.startsWith('anchor-name: --node-anchor');
8
7
  };
@@ -44,9 +43,6 @@ function isDnDStyleMutation(_ref) {
44
43
  if (!fg('platform_editor_exclude_dnd_anchor_name_from_ttvc')) {
45
44
  return false;
46
45
  }
47
- if (!expVal('platform_editor_tables_scaling_css', 'excludeDnD', false)) {
48
- return false;
49
- }
50
46
  if (!(target instanceof Element)) {
51
47
  return false;
52
48
  }
@@ -12,12 +12,7 @@ import isViewportEntryData from '../utils/is-viewport-entry-data';
12
12
  var ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
13
13
  var REVISION_NO = 'fy25.03';
14
14
  var getConsideredEntryTypes = function getConsideredEntryTypes(include3p) {
15
- var entryTypes = ['mutation:child-element', 'mutation:element', 'mutation:attribute', 'layout-shift', 'window:event'];
16
-
17
- // in rolling this out, still include it in TTVC v3
18
- if (fg('platform_ufo_vc_next_filter_ls_entries_same_rect')) {
19
- entryTypes.push('layout-shift:same-rect');
20
- }
15
+ var entryTypes = ['mutation:child-element', 'mutation:element', 'mutation:attribute', 'layout-shift', 'layout-shift:same-rect', 'window:event'];
21
16
 
22
17
  // If not exclude 3p elements from ttvc,
23
18
  // including the tags into the ConsideredEntryTypes so that it won't be ignored for TTVC calculation
@@ -6,7 +6,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  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; } } }; }
7
7
  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; } }
8
8
  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; }
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { isContainedWithinMediaWrapper } from '../../vc-observer/media-wrapper/vc-utils';
11
10
  import isDnDStyleMutation from '../../vc-observer/observers/non-visual-styles/is-dnd-style-mutation';
12
11
  import isNonVisualStyleMutation from '../../vc-observer/observers/non-visual-styles/is-non-visual-style-mutation';
@@ -351,26 +350,15 @@ var ViewportObserver = /*#__PURE__*/function () {
351
350
  var changedRect = _step3.value;
352
351
  var target = changedRect.node;
353
352
  if (target) {
354
- if (fg('platform_ufo_vc_next_filter_ls_entries_same_rect')) {
355
- var isSameCurrentAndPreviousRects = isSameRectDimensions(changedRect.rect, changedRect.previousRect);
356
- _this.onChange({
357
- time: time,
358
- elementRef: new WeakRef(target),
359
- visible: true,
360
- rect: changedRect.rect,
361
- previousRect: changedRect.previousRect,
362
- type: isSameCurrentAndPreviousRects ? 'layout-shift:same-rect' : 'layout-shift'
363
- });
364
- } else {
365
- _this.onChange({
366
- time: time,
367
- elementRef: new WeakRef(target),
368
- visible: true,
369
- rect: changedRect.rect,
370
- previousRect: changedRect.previousRect,
371
- type: 'layout-shift'
372
- });
373
- }
353
+ var isSameCurrentAndPreviousRects = isSameRectDimensions(changedRect.rect, changedRect.previousRect);
354
+ _this.onChange({
355
+ time: time,
356
+ elementRef: new WeakRef(target),
357
+ visible: true,
358
+ rect: changedRect.rect,
359
+ previousRect: changedRect.previousRect,
360
+ type: isSameCurrentAndPreviousRects ? 'layout-shift:same-rect' : 'layout-shift'
361
+ });
374
362
  }
375
363
  }
376
364
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.12.1",
3
+ "version": "4.12.3",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -85,9 +85,6 @@
85
85
  "platform_ufo_canvas_heatmap_full_precision": {
86
86
  "type": "boolean"
87
87
  },
88
- "platform_ufo_vc_next_filter_ls_entries_same_rect": {
89
- "type": "boolean"
90
- },
91
88
  "platform_ufo_enable_media_for_ttvc_v3": {
92
89
  "type": "boolean"
93
90
  },