@atlaskit/editor-common 74.12.0 → 74.13.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +1 -1
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +0 -1
  5. package/dist/cjs/react-node-view/index.js +0 -1
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/cjs/utils/get-performance-options.js +1 -4
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/cjs/with-plugin-state/index.js +1 -4
  10. package/dist/es2019/__tests_external__/page-objects/EditorSmartLink.js +1 -0
  11. package/dist/es2019/monitoring/error.js +1 -1
  12. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +0 -1
  13. package/dist/es2019/react-node-view/index.js +0 -1
  14. package/dist/es2019/ui/DropList/index.js +1 -1
  15. package/dist/es2019/utils/get-performance-options.js +1 -4
  16. package/dist/es2019/version.json +1 -1
  17. package/dist/es2019/with-plugin-state/index.js +1 -4
  18. package/dist/esm/__tests_external__/page-objects/EditorSmartLink.js +1 -0
  19. package/dist/esm/monitoring/error.js +1 -1
  20. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +0 -1
  21. package/dist/esm/react-node-view/index.js +0 -1
  22. package/dist/esm/ui/DropList/index.js +1 -1
  23. package/dist/esm/utils/get-performance-options.js +1 -4
  24. package/dist/esm/version.json +1 -1
  25. package/dist/esm/with-plugin-state/index.js +1 -4
  26. package/dist/types/__tests_external__/page-objects/EditorSmartLink.d.ts +1 -1
  27. package/dist/types/analytics/types/general-events.d.ts +0 -2
  28. package/dist/types/provider-factory/card-provider.d.ts +1 -1
  29. package/dist/types/utils/get-performance-options.d.ts +1 -3
  30. package/dist/types-ts4.5/__tests_external__/page-objects/EditorSmartLink.d.ts +1 -1
  31. package/dist/types-ts4.5/analytics/types/general-events.d.ts +0 -2
  32. package/dist/types-ts4.5/provider-factory/card-provider.d.ts +1 -1
  33. package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -3
  34. package/package.json +5 -5
  35. package/dist/cjs/utils/collab.js +0 -18
  36. package/dist/es2019/utils/collab.js +0 -11
  37. package/dist/esm/utils/collab.js +0 -11
  38. package/dist/types/utils/collab.d.ts +0 -2
  39. package/dist/types-ts4.5/utils/collab.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 74.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`6c1685f4793`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c1685f4793) - [ED-18163] Removed participant count from generic editor-common analytics events
8
+
3
9
  ## 74.12.0
4
10
 
5
11
  ### Minor Changes
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _inProductTesting = require("@atlaskit/in-product-testing");
16
16
  var _inProduct = require("@atlaskit/smart-card/in-product");
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
18
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
18
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // eslint-disable-next-line import/no-extraneous-dependencies
19
19
  var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
20
20
  (0, _inherits2.default)(EditorSmartLinkPageObject, _InProductTestPageObj);
21
21
  var _super = _createSuper(EditorSmartLinkPageObject);
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "74.12.0";
19
+ var packageVersion = "74.13.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -78,7 +78,6 @@ function createNodeView(_ref) {
78
78
  trackingEnabled && (0, _utils.stopMeasureReactNodeViewRendered)({
79
79
  nodeTypeName: currentNode.type.name,
80
80
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
81
- editorState: nodeViewParams.view.state,
82
81
  samplingRate: samplingRate,
83
82
  slowThreshold: slowThreshold
84
83
  });
@@ -104,7 +104,6 @@ var ReactNodeView = /*#__PURE__*/function () {
104
104
  trackingEnabled && (0, _utils.stopMeasureReactNodeViewRendered)({
105
105
  nodeTypeName: this.node.type.name,
106
106
  dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
107
- editorState: this.view.state,
108
107
  samplingRate: samplingRate,
109
108
  slowThreshold: slowThreshold
110
109
  });
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
25
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "74.12.0";
27
+ var packageVersion = "74.13.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -7,7 +7,6 @@ exports.getPerformanceOptions = getPerformanceOptions;
7
7
  exports.startMeasureReactNodeViewRendered = startMeasureReactNodeViewRendered;
8
8
  exports.stopMeasureReactNodeViewRendered = stopMeasureReactNodeViewRendered;
9
9
  var _analytics = require("../analytics");
10
- var _collab = require("./collab");
11
10
  var _measure = require("./performance/measure");
12
11
  // This was existing logic when converting from ReactNodeView
13
12
  // our current sampling for this event is not bound by node.type
@@ -42,7 +41,6 @@ function startMeasureReactNodeViewRendered(_ref) {
42
41
  function stopMeasureReactNodeViewRendered(_ref2) {
43
42
  var nodeTypeName = _ref2.nodeTypeName,
44
43
  dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
45
- editorState = _ref2.editorState,
46
44
  samplingRate = _ref2.samplingRate,
47
45
  slowThreshold = _ref2.slowThreshold;
48
46
  (0, _measure.stopMeasure)("\uD83E\uDD89".concat(nodeTypeName, "::ReactNodeView"), function (duration) {
@@ -53,8 +51,7 @@ function stopMeasureReactNodeViewRendered(_ref2) {
53
51
  eventType: _analytics.EVENT_TYPE.OPERATIONAL,
54
52
  attributes: {
55
53
  node: nodeTypeName,
56
- duration: duration,
57
- participants: (0, _collab.getParticipantsCount)(editorState)
54
+ duration: duration
58
55
  }
59
56
  });
60
57
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.12.0",
3
+ "version": "74.13.0",
4
4
  "sideEffects": false
5
5
  }
@@ -17,7 +17,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
  var _analytics = require("../analytics");
18
18
  var _eventDispatcher = require("../event-dispatcher");
19
19
  var _utils = require("../utils");
20
- var _collab = require("../utils/collab");
21
20
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
21
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -116,15 +115,13 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
116
115
  performanceOptions.trackingEnabled && (0, _utils.stopMeasure)(measure, function (duration) {
117
116
  // Each WithPluginState component will fire analytics event no more than once every `samplingLimit` times
118
117
  if (++_this.callsCount % performanceOptions.samplingRate === 0 && duration > performanceOptions.slowThreshold) {
119
- var _editorView = _this.getEditorView();
120
118
  _this.dispatchAnalyticsEvent({
121
119
  action: _analytics.ACTION.WITH_PLUGIN_STATE_CALLED,
122
120
  actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
123
121
  eventType: _analytics.EVENT_TYPE.OPERATIONAL,
124
122
  attributes: {
125
123
  plugin: pluginName,
126
- duration: duration,
127
- participants: (0, _collab.getParticipantsCount)(_editorView && _editorView.state)
124
+ duration: duration
128
125
  }
129
126
  });
130
127
  }
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { InProductTestPageObject } from '@atlaskit/in-product-testing';
3
+ // eslint-disable-next-line import/no-extraneous-dependencies
3
4
  import { BlockCardPageObject, EmbedCardPageObject, InlineCardPageObject } from '@atlaskit/smart-card/in-product';
4
5
  export class EditorSmartLinkPageObject extends InProductTestPageObject {
5
6
  constructor(cy, editor) {
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "74.12.0";
3
+ const packageVersion = "74.13.0";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -70,7 +70,6 @@ function createNodeView({
70
70
  trackingEnabled && stopMeasureReactNodeViewRendered({
71
71
  nodeTypeName: currentNode.type.name,
72
72
  dispatchAnalyticsEvent,
73
- editorState: nodeViewParams.view.state,
74
73
  samplingRate,
75
74
  slowThreshold
76
75
  });
@@ -73,7 +73,6 @@ export default class ReactNodeView {
73
73
  trackingEnabled && stopMeasureReactNodeViewRendered({
74
74
  nodeTypeName: this.node.type.name,
75
75
  dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
76
- editorState: this.view.state,
77
76
  samplingRate,
78
77
  slowThreshold
79
78
  });
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import Layer from '../Layer';
10
10
  const packageName = "@atlaskit/editor-common";
11
- const packageVersion = "74.12.0";
11
+ const packageVersion = "74.13.0";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = '0, 8';
14
14
  class DropList extends Component {
@@ -1,5 +1,4 @@
1
1
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
2
- import { getParticipantsCount } from './collab';
3
2
  import { startMeasure, stopMeasure } from './performance/measure';
4
3
 
5
4
  // This was existing logic when converting from ReactNodeView
@@ -36,7 +35,6 @@ export function startMeasureReactNodeViewRendered({
36
35
  export function stopMeasureReactNodeViewRendered({
37
36
  nodeTypeName,
38
37
  dispatchAnalyticsEvent,
39
- editorState,
40
38
  samplingRate,
41
39
  slowThreshold
42
40
  }) {
@@ -48,8 +46,7 @@ export function stopMeasureReactNodeViewRendered({
48
46
  eventType: EVENT_TYPE.OPERATIONAL,
49
47
  attributes: {
50
48
  node: nodeTypeName,
51
- duration,
52
- participants: getParticipantsCount(editorState)
49
+ duration
53
50
  }
54
51
  });
55
52
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.12.0",
3
+ "version": "74.13.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
4
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
5
5
  import { createDispatch } from '../event-dispatcher';
6
6
  import { analyticsEventKey, startMeasure, stopMeasure } from '../utils';
7
- import { getParticipantsCount } from '../utils/collab';
8
7
  const DEFAULT_SAMPLING_RATE = 100;
9
8
  const DEFAULT_SLOW_THRESHOLD = 4;
10
9
 
@@ -92,15 +91,13 @@ class WithPluginState extends React.Component {
92
91
  performanceOptions.trackingEnabled && stopMeasure(measure, duration => {
93
92
  // Each WithPluginState component will fire analytics event no more than once every `samplingLimit` times
94
93
  if (++this.callsCount % performanceOptions.samplingRate === 0 && duration > performanceOptions.slowThreshold) {
95
- const editorView = this.getEditorView();
96
94
  this.dispatchAnalyticsEvent({
97
95
  action: ACTION.WITH_PLUGIN_STATE_CALLED,
98
96
  actionSubject: ACTION_SUBJECT.EDITOR,
99
97
  eventType: EVENT_TYPE.OPERATIONAL,
100
98
  attributes: {
101
99
  plugin: pluginName,
102
- duration,
103
- participants: getParticipantsCount(editorView && editorView.state)
100
+ duration
104
101
  }
105
102
  });
106
103
  }
@@ -8,6 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
9
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
10
  import { InProductTestPageObject } from '@atlaskit/in-product-testing';
11
+ // eslint-disable-next-line import/no-extraneous-dependencies
11
12
  import { BlockCardPageObject, EmbedCardPageObject, InlineCardPageObject } from '@atlaskit/smart-card/in-product';
12
13
  export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
13
14
  _inherits(EditorSmartLinkPageObject, _InProductTestPageObj);
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "74.12.0";
9
+ var packageVersion = "74.13.0";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -68,7 +68,6 @@ function createNodeView(_ref) {
68
68
  trackingEnabled && stopMeasureReactNodeViewRendered({
69
69
  nodeTypeName: currentNode.type.name,
70
70
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
71
- editorState: nodeViewParams.view.state,
72
71
  samplingRate: samplingRate,
73
72
  slowThreshold: slowThreshold
74
73
  });
@@ -85,7 +85,6 @@ var ReactNodeView = /*#__PURE__*/function () {
85
85
  trackingEnabled && stopMeasureReactNodeViewRendered({
86
86
  nodeTypeName: this.node.type.name,
87
87
  dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
88
- editorState: this.view.state,
89
88
  samplingRate: samplingRate,
90
89
  slowThreshold: slowThreshold
91
90
  });
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
18
18
  import { borderRadius } from '@atlaskit/theme/constants';
19
19
  import Layer from '../Layer';
20
20
  var packageName = "@atlaskit/editor-common";
21
- var packageVersion = "74.12.0";
21
+ var packageVersion = "74.13.0";
22
22
  var halfFocusRing = 1;
23
23
  var dropOffset = '0, 8';
24
24
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,5 +1,4 @@
1
1
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
2
- import { getParticipantsCount } from './collab';
3
2
  import { startMeasure, stopMeasure } from './performance/measure';
4
3
 
5
4
  // This was existing logic when converting from ReactNodeView
@@ -35,7 +34,6 @@ export function startMeasureReactNodeViewRendered(_ref) {
35
34
  export function stopMeasureReactNodeViewRendered(_ref2) {
36
35
  var nodeTypeName = _ref2.nodeTypeName,
37
36
  dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
38
- editorState = _ref2.editorState,
39
37
  samplingRate = _ref2.samplingRate,
40
38
  slowThreshold = _ref2.slowThreshold;
41
39
  stopMeasure("\uD83E\uDD89".concat(nodeTypeName, "::ReactNodeView"), function (duration) {
@@ -46,8 +44,7 @@ export function stopMeasureReactNodeViewRendered(_ref2) {
46
44
  eventType: EVENT_TYPE.OPERATIONAL,
47
45
  attributes: {
48
46
  node: nodeTypeName,
49
- duration: duration,
50
- participants: getParticipantsCount(editorState)
47
+ duration: duration
51
48
  }
52
49
  });
53
50
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.12.0",
3
+ "version": "74.13.0",
4
4
  "sideEffects": false
5
5
  }
@@ -14,7 +14,6 @@ import PropTypes from 'prop-types';
14
14
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
15
15
  import { createDispatch } from '../event-dispatcher';
16
16
  import { analyticsEventKey, startMeasure, stopMeasure } from '../utils';
17
- import { getParticipantsCount } from '../utils/collab';
18
17
  var DEFAULT_SAMPLING_RATE = 100;
19
18
  var DEFAULT_SLOW_THRESHOLD = 4;
20
19
 
@@ -109,15 +108,13 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
109
108
  performanceOptions.trackingEnabled && stopMeasure(measure, function (duration) {
110
109
  // Each WithPluginState component will fire analytics event no more than once every `samplingLimit` times
111
110
  if (++_this.callsCount % performanceOptions.samplingRate === 0 && duration > performanceOptions.slowThreshold) {
112
- var _editorView = _this.getEditorView();
113
111
  _this.dispatchAnalyticsEvent({
114
112
  action: ACTION.WITH_PLUGIN_STATE_CALLED,
115
113
  actionSubject: ACTION_SUBJECT.EDITOR,
116
114
  eventType: EVENT_TYPE.OPERATIONAL,
117
115
  attributes: {
118
116
  plugin: pluginName,
119
- duration: duration,
120
- participants: getParticipantsCount(_editorView && _editorView.state)
117
+ duration: duration
121
118
  }
122
119
  });
123
120
  }
@@ -2,7 +2,7 @@
2
2
  /// <reference types="cypress" />
3
3
  /// <reference types="cypress" />
4
4
  import { CypressType, InProductTestPageObject } from '@atlaskit/in-product-testing';
5
- import { CardAppearance } from '@atlaskit/smart-card';
5
+ import type { CardAppearance } from '@atlaskit/smart-card';
6
6
  import { EditorPageObject } from './Editor';
7
7
  export declare class EditorSmartLinkPageObject extends InProductTestPageObject {
8
8
  protected cy: CypressType;
@@ -104,12 +104,10 @@ type TransactionMutatedAEP = OperationalAEP<ACTION.TRANSACTION_MUTATED_AFTER_DIS
104
104
  type WithPluginStateCalledAEP = OperationalAEP<ACTION.WITH_PLUGIN_STATE_CALLED, ACTION_SUBJECT.EDITOR, undefined, {
105
105
  plugin: string;
106
106
  duration: number;
107
- participants: number;
108
107
  }, undefined>;
109
108
  type ReactNodeViewRenderedAEP = OperationalAEP<ACTION.REACT_NODEVIEW_RENDERED, ACTION_SUBJECT.EDITOR, undefined, {
110
109
  node: string;
111
110
  duration: number;
112
- participants: number;
113
111
  }, undefined>;
114
112
  type UploadExternalFailedAEP = OperationalAEP<ACTION.UPLOAD_EXTERNAL_FAIL, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
115
113
  type InvalidProsemirrorDocumentErrorAEP = OperationalAEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.EDITOR, undefined, {
@@ -1,4 +1,4 @@
1
- import { CardAdf, DatasourceAdf } from '@atlaskit/smart-card';
1
+ import type { CardAdf, DatasourceAdf } from '@atlaskit/smart-card';
2
2
  export type CardAppearance = 'inline' | 'block' | 'embed';
3
3
  export type { CardAdf, DatasourceAdf };
4
4
  export interface CardProvider {
@@ -1,4 +1,3 @@
1
- import type { EditorState } from 'prosemirror-state';
2
1
  import type { EditorView } from 'prosemirror-view';
3
2
  import { AnalyticsEventPayload } from '../analytics';
4
3
  export declare function getPerformanceOptions(view: EditorView): {
@@ -9,10 +8,9 @@ export declare function getPerformanceOptions(view: EditorView): {
9
8
  export declare function startMeasureReactNodeViewRendered({ nodeTypeName, }: {
10
9
  nodeTypeName: string;
11
10
  }): void;
12
- export declare function stopMeasureReactNodeViewRendered({ nodeTypeName, dispatchAnalyticsEvent, editorState, samplingRate, slowThreshold, }: {
11
+ export declare function stopMeasureReactNodeViewRendered({ nodeTypeName, dispatchAnalyticsEvent, samplingRate, slowThreshold, }: {
13
12
  nodeTypeName: string;
14
13
  dispatchAnalyticsEvent(payload: AnalyticsEventPayload): void;
15
- editorState: EditorState;
16
14
  samplingRate: number;
17
15
  slowThreshold: number;
18
16
  }): void;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="cypress" />
2
2
  import { CypressType, InProductTestPageObject } from '@atlaskit/in-product-testing';
3
- import { CardAppearance } from '@atlaskit/smart-card';
3
+ import type { CardAppearance } from '@atlaskit/smart-card';
4
4
  import { EditorPageObject } from './Editor';
5
5
  export declare class EditorSmartLinkPageObject extends InProductTestPageObject {
6
6
  protected cy: CypressType;
@@ -104,12 +104,10 @@ type TransactionMutatedAEP = OperationalAEP<ACTION.TRANSACTION_MUTATED_AFTER_DIS
104
104
  type WithPluginStateCalledAEP = OperationalAEP<ACTION.WITH_PLUGIN_STATE_CALLED, ACTION_SUBJECT.EDITOR, undefined, {
105
105
  plugin: string;
106
106
  duration: number;
107
- participants: number;
108
107
  }, undefined>;
109
108
  type ReactNodeViewRenderedAEP = OperationalAEP<ACTION.REACT_NODEVIEW_RENDERED, ACTION_SUBJECT.EDITOR, undefined, {
110
109
  node: string;
111
110
  duration: number;
112
- participants: number;
113
111
  }, undefined>;
114
112
  type UploadExternalFailedAEP = OperationalAEP<ACTION.UPLOAD_EXTERNAL_FAIL, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
115
113
  type InvalidProsemirrorDocumentErrorAEP = OperationalAEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.EDITOR, undefined, {
@@ -1,4 +1,4 @@
1
- import { CardAdf, DatasourceAdf } from '@atlaskit/smart-card';
1
+ import type { CardAdf, DatasourceAdf } from '@atlaskit/smart-card';
2
2
  export type CardAppearance = 'inline' | 'block' | 'embed';
3
3
  export type { CardAdf, DatasourceAdf };
4
4
  export interface CardProvider {
@@ -1,4 +1,3 @@
1
- import type { EditorState } from 'prosemirror-state';
2
1
  import type { EditorView } from 'prosemirror-view';
3
2
  import { AnalyticsEventPayload } from '../analytics';
4
3
  export declare function getPerformanceOptions(view: EditorView): {
@@ -9,10 +8,9 @@ export declare function getPerformanceOptions(view: EditorView): {
9
8
  export declare function startMeasureReactNodeViewRendered({ nodeTypeName, }: {
10
9
  nodeTypeName: string;
11
10
  }): void;
12
- export declare function stopMeasureReactNodeViewRendered({ nodeTypeName, dispatchAnalyticsEvent, editorState, samplingRate, slowThreshold, }: {
11
+ export declare function stopMeasureReactNodeViewRendered({ nodeTypeName, dispatchAnalyticsEvent, samplingRate, slowThreshold, }: {
13
12
  nodeTypeName: string;
14
13
  dispatchAnalyticsEvent(payload: AnalyticsEventPayload): void;
15
- editorState: EditorState;
16
14
  samplingRate: number;
17
15
  slowThreshold: number;
18
16
  }): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.12.0",
3
+ "version": "74.13.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -82,7 +82,7 @@
82
82
  "@atlaskit/button": "^16.8.0",
83
83
  "@atlaskit/code": "^14.6.0",
84
84
  "@atlaskit/codemod-utils": "^4.2.0",
85
- "@atlaskit/collab-provider": "^9.4.0",
85
+ "@atlaskit/collab-provider": "^9.5.0",
86
86
  "@atlaskit/editor-palette": "1.5.1",
87
87
  "@atlaskit/editor-shared-styles": "^2.4.0",
88
88
  "@atlaskit/emoji": "^67.4.0",
@@ -95,11 +95,10 @@
95
95
  "@atlaskit/menu": "^1.9.0",
96
96
  "@atlaskit/platform-feature-flags": "^0.2.0",
97
97
  "@atlaskit/profilecard": "^19.5.0",
98
- "@atlaskit/smart-card": "^26.8.0",
99
98
  "@atlaskit/smart-user-picker": "^6.1.0",
100
99
  "@atlaskit/task-decision": "^17.6.0",
101
100
  "@atlaskit/theme": "^12.5.0",
102
- "@atlaskit/tokens": "^1.10.0",
101
+ "@atlaskit/tokens": "^1.11.0",
103
102
  "@atlaskit/tooltip": "^17.8.0",
104
103
  "@atlaskit/ufo": "^0.2.0",
105
104
  "@atlaskit/width-detector": "^4.1.0",
@@ -145,11 +144,12 @@
145
144
  "@atlaskit/editor-plugin-decorations": "^0.1.0",
146
145
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",
147
146
  "@atlaskit/editor-plugin-grid": "^0.1.0",
148
- "@atlaskit/editor-plugin-table": "^1.6.0",
147
+ "@atlaskit/editor-plugin-table": "^1.7.0",
149
148
  "@atlaskit/editor-plugin-width": "^0.1.0",
150
149
  "@atlaskit/editor-test-helpers": "^18.7.0",
151
150
  "@atlaskit/media-core": "^34.1.0",
152
151
  "@atlaskit/media-test-helpers": "^33.0.0",
152
+ "@atlaskit/smart-card": "^26.8.0",
153
153
  "@atlaskit/util-data-test": "^17.8.0",
154
154
  "@atlaskit/visual-regression": "*",
155
155
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getParticipantsCount = void 0;
7
- var getParticipantsCount = function getParticipantsCount(editorState) {
8
- var _collabEditPlugin$$pa, _collabEditPlugin$$pa2;
9
- // TODO: ED-15663
10
- // Please, do not copy or use this kind of code below
11
- // @ts-ignore
12
- if (!editorState || !editorState['collabEditPlugin$']) {
13
- return 1;
14
- }
15
- var participantsCount = (_collabEditPlugin$$pa = (_collabEditPlugin$$pa2 = editorState['collabEditPlugin$'].participants) === null || _collabEditPlugin$$pa2 === void 0 ? void 0 : _collabEditPlugin$$pa2.size()) !== null && _collabEditPlugin$$pa !== void 0 ? _collabEditPlugin$$pa : 1;
16
- return participantsCount;
17
- };
18
- exports.getParticipantsCount = getParticipantsCount;
@@ -1,11 +0,0 @@
1
- export const getParticipantsCount = editorState => {
2
- var _collabEditPlugin$$pa, _collabEditPlugin$$pa2;
3
- // TODO: ED-15663
4
- // Please, do not copy or use this kind of code below
5
- // @ts-ignore
6
- if (!editorState || !editorState['collabEditPlugin$']) {
7
- return 1;
8
- }
9
- const participantsCount = (_collabEditPlugin$$pa = (_collabEditPlugin$$pa2 = editorState['collabEditPlugin$'].participants) === null || _collabEditPlugin$$pa2 === void 0 ? void 0 : _collabEditPlugin$$pa2.size()) !== null && _collabEditPlugin$$pa !== void 0 ? _collabEditPlugin$$pa : 1;
10
- return participantsCount;
11
- };
@@ -1,11 +0,0 @@
1
- export var getParticipantsCount = function getParticipantsCount(editorState) {
2
- var _collabEditPlugin$$pa, _collabEditPlugin$$pa2;
3
- // TODO: ED-15663
4
- // Please, do not copy or use this kind of code below
5
- // @ts-ignore
6
- if (!editorState || !editorState['collabEditPlugin$']) {
7
- return 1;
8
- }
9
- var participantsCount = (_collabEditPlugin$$pa = (_collabEditPlugin$$pa2 = editorState['collabEditPlugin$'].participants) === null || _collabEditPlugin$$pa2 === void 0 ? void 0 : _collabEditPlugin$$pa2.size()) !== null && _collabEditPlugin$$pa !== void 0 ? _collabEditPlugin$$pa : 1;
10
- return participantsCount;
11
- };
@@ -1,2 +0,0 @@
1
- import type { EditorState } from 'prosemirror-state';
2
- export declare const getParticipantsCount: (editorState?: EditorState) => any;
@@ -1,2 +0,0 @@
1
- import type { EditorState } from 'prosemirror-state';
2
- export declare const getParticipantsCount: (editorState?: EditorState) => any;