@atlaskit/editor-plugin-analytics 1.8.2 → 1.8.4

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,22 @@
1
1
  # @atlaskit/editor-plugin-analytics
2
2
 
3
+ ## 1.8.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#137736](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137736)
8
+ [`2a88fdd213838`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2a88fdd213838) -
9
+ Introducing new smaller refined entry-points for editor-common to reduce bundle size.
10
+ - Updated dependencies
11
+
12
+ ## 1.8.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#136143](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136143)
17
+ [`851c2575d214e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/851c2575d214e) -
18
+ Use optimised entry-points for analytics packages to reduce bundle size.
19
+
3
20
  ## 1.8.2
4
21
 
5
22
  ### Patch Changes
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.editorAnalyticsChannel = exports.analyticsEventKey = void 0;
7
- var _analyticsListeners = require("@atlaskit/analytics-listeners");
7
+ var _types = require("@atlaskit/analytics-listeners/types");
8
8
  var _utils = require("@atlaskit/editor-common/utils");
9
9
  var analyticsEventKey = exports.analyticsEventKey = _utils.analyticsEventKey;
10
- var editorAnalyticsChannel = exports.editorAnalyticsChannel = _analyticsListeners.FabricChannel.editor;
10
+ var editorAnalyticsChannel = exports.editorAnalyticsChannel = _types.FabricChannel.editor;
@@ -10,11 +10,12 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _react = require("react");
12
12
  var _steps = require("@atlaskit/adf-schema/steps");
13
- var _analyticsListeners = require("@atlaskit/analytics-listeners");
14
- var _analyticsNext = require("@atlaskit/analytics-next");
13
+ var _types = require("@atlaskit/analytics-listeners/types");
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");
@@ -27,7 +28,7 @@ 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)
@@ -127,7 +128,7 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
127
128
  },
128
129
  actions: {
129
130
  attachAnalyticsEvent: function attachAnalyticsEvent(payload) {
130
- var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _analyticsListeners.FabricChannel.editor;
131
+ var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _types.FabricChannel.editor;
131
132
  return function (tr) {
132
133
  var _api$analytics$shared, _api$analytics;
133
134
  var _ref5 = (_api$analytics$shared = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.sharedState.currentState()) !== null && _api$analytics$shared !== void 0 ? _api$analytics$shared : {},
@@ -158,7 +159,7 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
158
159
  },
159
160
  usePluginHook: function usePluginHook(_ref7) {
160
161
  var editorView = _ref7.editorView;
161
- var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
162
+ var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
162
163
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
163
164
  (0, _react.useLayoutEffect)(function () {
164
165
  var dispatch = editorView.dispatch,
@@ -1,4 +1,4 @@
1
- import { FabricChannel } from '@atlaskit/analytics-listeners';
1
+ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
2
2
  import { analyticsEventKey as key } from '@atlaskit/editor-common/utils';
3
3
  export const analyticsEventKey = key;
4
4
  export const editorAnalyticsChannel = FabricChannel.editor;
@@ -1,10 +1,11 @@
1
1
  import { useLayoutEffect } from 'react';
2
2
  import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
3
- import { FabricChannel } from '@atlaskit/analytics-listeners';
4
- import { useAnalyticsEvents } from '@atlaskit/analytics-next';
3
+ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
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,4 +1,4 @@
1
- import { FabricChannel } from '@atlaskit/analytics-listeners';
1
+ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
2
2
  import { analyticsEventKey as key } from '@atlaskit/editor-common/utils';
3
3
  export var analyticsEventKey = key;
4
4
  export var editorAnalyticsChannel = FabricChannel.editor;
@@ -7,11 +7,12 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
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';
9
9
  import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
10
- import { FabricChannel } from '@atlaskit/analytics-listeners';
11
- import { useAnalyticsEvents } from '@atlaskit/analytics-next';
10
+ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
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';
@@ -1,3 +1,3 @@
1
- import { FabricChannel } from '@atlaskit/analytics-listeners';
1
+ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
2
2
  export declare const analyticsEventKey = "EDITOR_ANALYTICS_EVENT";
3
3
  export declare const editorAnalyticsChannel = FabricChannel.editor;
@@ -1,3 +1,3 @@
1
- import { FabricChannel } from '@atlaskit/analytics-listeners';
1
+ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
2
2
  export declare const analyticsEventKey = "EDITOR_ANALYTICS_EVENT";
3
3
  export declare const editorAnalyticsChannel = FabricChannel.editor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-analytics",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
4
4
  "description": "Analytics plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -10,7 +10,6 @@
10
10
  "atlassian": {
11
11
  "team": "Editor: Lego",
12
12
  "singleton": true,
13
- "releaseModel": "continuous",
14
13
  "runReact18": true
15
14
  },
16
15
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
@@ -35,7 +34,7 @@
35
34
  "@atlaskit/adf-schema": "^40.9.0",
36
35
  "@atlaskit/analytics-listeners": "^8.11.0",
37
36
  "@atlaskit/analytics-next": "^10.1.0",
38
- "@atlaskit/editor-common": "^88.2.0",
37
+ "@atlaskit/editor-common": "^88.11.0",
39
38
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
40
39
  "@atlaskit/editor-prosemirror": "5.0.1",
41
40
  "@atlaskit/editor-tables": "^2.8.0",