@atlaskit/insm 1.0.3 → 1.0.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/insm
2
2
 
3
+ ## 1.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1089121c89c91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1089121c89c91) -
8
+ Clean up feature gate `cc_editor_insm_fix_attributes`
9
+ - Updated dependencies
10
+
11
+ ## 1.0.4
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 1.0.3
4
18
 
5
19
  ### Patch Changes
@@ -8,10 +8,10 @@ exports.PeriodTracking = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  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; } } }; }
13
12
  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; } }
14
- 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; } /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
13
+ 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; }
14
+ /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
15
15
  var PeriodTracking = exports.PeriodTracking = /*#__PURE__*/function () {
16
16
  function PeriodTracking(session) {
17
17
  (0, _classCallCheck2.default)(this, PeriodTracking);
@@ -157,25 +157,22 @@ var PeriodTracking = exports.PeriodTracking = /*#__PURE__*/function () {
157
157
  key: "endResults",
158
158
  get: function get() {
159
159
  this.changePeriodAndTrackLast(this.state);
160
- if ((0, _platformFeatureFlags.fg)('cc_editor_insm_fix_attributes')) {
161
- return {
162
- active: {
163
- features: Array.from(this.periodMeasurements.active.features),
164
- heavyTasks: Array.from(this.periodMeasurements.active.heavyTasks),
165
- measurements: this.periodMeasurements.active.measurements,
166
- duration: this.periodMeasurements.active.duration,
167
- count: this.periodMeasurements.active.count
168
- },
169
- inactive: {
170
- features: Array.from(this.periodMeasurements.inactive.features),
171
- heavyTasks: Array.from(this.periodMeasurements.inactive.heavyTasks),
172
- measurements: this.periodMeasurements.inactive.measurements,
173
- duration: this.periodMeasurements.inactive.duration,
174
- count: this.periodMeasurements.inactive.count
175
- }
176
- };
177
- }
178
- return this.periodMeasurements;
160
+ return {
161
+ active: {
162
+ features: Array.from(this.periodMeasurements.active.features),
163
+ heavyTasks: Array.from(this.periodMeasurements.active.heavyTasks),
164
+ measurements: this.periodMeasurements.active.measurements,
165
+ duration: this.periodMeasurements.active.duration,
166
+ count: this.periodMeasurements.active.count
167
+ },
168
+ inactive: {
169
+ features: Array.from(this.periodMeasurements.inactive.features),
170
+ heavyTasks: Array.from(this.periodMeasurements.inactive.heavyTasks),
171
+ measurements: this.periodMeasurements.inactive.measurements,
172
+ duration: this.periodMeasurements.inactive.duration,
173
+ count: this.periodMeasurements.inactive.count
174
+ }
175
+ };
179
176
  }
180
177
  }, {
181
178
  key: "setupActiveStartInteractionListeners",
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
3
- import { fg } from '@atlaskit/platform-feature-flags';
3
+
4
4
  export class PeriodTracking {
5
5
  constructor(session) {
6
6
  _defineProperty(this, "periodMeasurements", {
@@ -106,25 +106,22 @@ export class PeriodTracking {
106
106
  }
107
107
  get endResults() {
108
108
  this.changePeriodAndTrackLast(this.state);
109
- if (fg('cc_editor_insm_fix_attributes')) {
110
- return {
111
- active: {
112
- features: Array.from(this.periodMeasurements.active.features),
113
- heavyTasks: Array.from(this.periodMeasurements.active.heavyTasks),
114
- measurements: this.periodMeasurements.active.measurements,
115
- duration: this.periodMeasurements.active.duration,
116
- count: this.periodMeasurements.active.count
117
- },
118
- inactive: {
119
- features: Array.from(this.periodMeasurements.inactive.features),
120
- heavyTasks: Array.from(this.periodMeasurements.inactive.heavyTasks),
121
- measurements: this.periodMeasurements.inactive.measurements,
122
- duration: this.periodMeasurements.inactive.duration,
123
- count: this.periodMeasurements.inactive.count
124
- }
125
- };
126
- }
127
- return this.periodMeasurements;
109
+ return {
110
+ active: {
111
+ features: Array.from(this.periodMeasurements.active.features),
112
+ heavyTasks: Array.from(this.periodMeasurements.active.heavyTasks),
113
+ measurements: this.periodMeasurements.active.measurements,
114
+ duration: this.periodMeasurements.active.duration,
115
+ count: this.periodMeasurements.active.count
116
+ },
117
+ inactive: {
118
+ features: Array.from(this.periodMeasurements.inactive.features),
119
+ heavyTasks: Array.from(this.periodMeasurements.inactive.heavyTasks),
120
+ measurements: this.periodMeasurements.inactive.measurements,
121
+ duration: this.periodMeasurements.inactive.duration,
122
+ count: this.periodMeasurements.inactive.count
123
+ }
124
+ };
128
125
  }
129
126
  setupActiveStartInteractionListeners() {
130
127
  const events = ['mousemove', 'pointerdown', 'pointerup', 'click', 'keydown', 'keyup', 'scroll'];
@@ -5,7 +5,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
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
7
  /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
8
- import { fg } from '@atlaskit/platform-feature-flags';
8
+
9
9
  export var PeriodTracking = /*#__PURE__*/function () {
10
10
  function PeriodTracking(session) {
11
11
  _classCallCheck(this, PeriodTracking);
@@ -151,25 +151,22 @@ export var PeriodTracking = /*#__PURE__*/function () {
151
151
  key: "endResults",
152
152
  get: function get() {
153
153
  this.changePeriodAndTrackLast(this.state);
154
- if (fg('cc_editor_insm_fix_attributes')) {
155
- return {
156
- active: {
157
- features: Array.from(this.periodMeasurements.active.features),
158
- heavyTasks: Array.from(this.periodMeasurements.active.heavyTasks),
159
- measurements: this.periodMeasurements.active.measurements,
160
- duration: this.periodMeasurements.active.duration,
161
- count: this.periodMeasurements.active.count
162
- },
163
- inactive: {
164
- features: Array.from(this.periodMeasurements.inactive.features),
165
- heavyTasks: Array.from(this.periodMeasurements.inactive.heavyTasks),
166
- measurements: this.periodMeasurements.inactive.measurements,
167
- duration: this.periodMeasurements.inactive.duration,
168
- count: this.periodMeasurements.inactive.count
169
- }
170
- };
171
- }
172
- return this.periodMeasurements;
154
+ return {
155
+ active: {
156
+ features: Array.from(this.periodMeasurements.active.features),
157
+ heavyTasks: Array.from(this.periodMeasurements.active.heavyTasks),
158
+ measurements: this.periodMeasurements.active.measurements,
159
+ duration: this.periodMeasurements.active.duration,
160
+ count: this.periodMeasurements.active.count
161
+ },
162
+ inactive: {
163
+ features: Array.from(this.periodMeasurements.inactive.features),
164
+ heavyTasks: Array.from(this.periodMeasurements.inactive.heavyTasks),
165
+ measurements: this.periodMeasurements.inactive.measurements,
166
+ duration: this.periodMeasurements.inactive.duration,
167
+ count: this.periodMeasurements.inactive.count
168
+ }
169
+ };
173
170
  }
174
171
  }, {
175
172
  key: "setupActiveStartInteractionListeners",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/insm",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "INSM tooling measures user-perceived interactivity of a page",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -18,19 +18,13 @@
18
18
  "atlaskit:src": "src/index.ts",
19
19
  "dependencies": {
20
20
  "@atlaskit/analytics-listeners": "^11.0.0",
21
- "@atlaskit/platform-feature-flags": "^2.0.0",
22
- "@atlaskit/tmp-editor-statsig": "^107.1.0",
21
+ "@atlaskit/tmp-editor-statsig": "^108.4.0",
23
22
  "@babel/runtime": "^7.0.0",
24
23
  "bowser-ultralight": "^1.0.6"
25
24
  },
26
25
  "peerDependencies": {
27
26
  "react": "^18.2.0"
28
27
  },
29
- "platform-feature-flags": {
30
- "cc_editor_insm_fix_attributes": {
31
- "type": "boolean"
32
- }
33
- },
34
28
  "devDependencies": {
35
29
  "@atlassian/structured-docs-types": "workspace:^",
36
30
  "react": "^18.2.0"