@atlaskit/editor-plugin-analytics 1.8.3 → 1.8.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,20 @@
1
1
  # @atlaskit/editor-plugin-analytics
2
2
 
3
+ ## 1.8.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.8.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#137736](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137736)
14
+ [`2a88fdd213838`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2a88fdd213838) -
15
+ Introducing new smaller refined entry-points for editor-common to reduce bundle size.
16
+ - Updated dependencies
17
+
3
18
  ## 1.8.3
4
19
 
5
20
  ### Patch Changes
@@ -13,21 +13,22 @@ var _steps = require("@atlaskit/adf-schema/steps");
13
13
  var _types = require("@atlaskit/analytics-listeners/types");
14
14
  var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
15
15
  var _analytics = require("@atlaskit/editor-common/analytics");
16
+ var _isPerformanceApiAvailable = require("@atlaskit/editor-common/is-performance-api-available");
17
+ var _measureRender = require("@atlaskit/editor-common/performance/measure-render");
16
18
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
17
- var _utils = require("@atlaskit/editor-common/utils");
18
19
  var _attachPayloadIntoTransaction = require("./analytics-api/attach-payload-into-transaction");
19
20
  var _pluginKey = require("./plugin-key");
20
21
  var _undoRedoInputSource = require("./undo-redo-input-source");
21
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
22
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
23
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22
+ 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; } } }; }
23
+ 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; } }
24
+ 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; }
24
25
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
26
  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) { (0, _defineProperty2.default)(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; }
26
27
  function createPlugin(options, featureFlags) {
27
28
  if (!options) {
28
29
  return;
29
30
  }
30
- var hasRequiredPerformanceAPIs = (0, _utils.isPerformanceAPIAvailable)();
31
+ var hasRequiredPerformanceAPIs = (0, _isPerformanceApiAvailable.isPerformanceAPIAvailable)();
31
32
  return new _safePlugin.SafePlugin({
32
33
  key: _pluginKey.analyticsPluginKey,
33
34
  state: {
@@ -62,7 +63,7 @@ function createPlugin(options, featureFlags) {
62
63
  // that has an analytics event.
63
64
  if (hasRequiredPerformanceAPIs && tr.docChanged && payload.action !== _analytics.ACTION.INSERTED && payload.action !== _analytics.ACTION.DELETED) {
64
65
  var measureName = "".concat(payload.actionSubject, ":").concat(payload.action, ":").concat(payload.actionSubjectId);
65
- (0, _utils.measureRender)(
66
+ (0, _measureRender.measureRender)(
66
67
  // NOTE this name could be resulting in misleading data -- where if multiple payloads are
67
68
  // received before a render completes -- the measurement value will be inaccurate (this is
68
69
  // due to measureRender requiring unique measureNames)
@@ -3,8 +3,9 @@ import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
3
3
  import { FabricChannel } from '@atlaskit/analytics-listeners/types';
4
4
  import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
5
5
  import { ACTION, EVENT_TYPE, fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
6
+ import { isPerformanceAPIAvailable } from '@atlaskit/editor-common/is-performance-api-available';
7
+ import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
6
8
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
- import { isPerformanceAPIAvailable, measureRender } from '@atlaskit/editor-common/utils';
8
9
  import { createAttachPayloadIntoTransaction } from './analytics-api/attach-payload-into-transaction';
9
10
  import { analyticsPluginKey } from './plugin-key';
10
11
  import { generateUndoRedoInputSoucePayload } from './undo-redo-input-source';
@@ -1,8 +1,8 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
4
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
3
+ 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; } } }; }
4
+ 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; } }
5
+ 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; }
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  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; }
8
8
  import { useLayoutEffect } from 'react';
@@ -10,8 +10,9 @@ import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
10
10
  import { FabricChannel } from '@atlaskit/analytics-listeners/types';
11
11
  import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
12
12
  import { ACTION, EVENT_TYPE, fireAnalyticsEvent as _fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
13
+ import { isPerformanceAPIAvailable } from '@atlaskit/editor-common/is-performance-api-available';
14
+ import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
13
15
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
14
- import { isPerformanceAPIAvailable, measureRender } from '@atlaskit/editor-common/utils';
15
16
  import { createAttachPayloadIntoTransaction } from './analytics-api/attach-payload-into-transaction';
16
17
  import { analyticsPluginKey } from './plugin-key';
17
18
  import { generateUndoRedoInputSoucePayload } from './undo-redo-input-source';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-analytics",
3
- "version": "1.8.3",
3
+ "version": "1.8.5",
4
4
  "description": "Analytics plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/adf-schema": "^40.9.0",
35
35
  "@atlaskit/analytics-listeners": "^8.11.0",
36
36
  "@atlaskit/analytics-next": "^10.1.0",
37
- "@atlaskit/editor-common": "^88.6.0",
37
+ "@atlaskit/editor-common": "^89.0.0",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
39
39
  "@atlaskit/editor-prosemirror": "5.0.1",
40
40
  "@atlaskit/editor-tables": "^2.8.0",