@atlaskit/editor-plugin-analytics 1.9.0 → 1.10.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-analytics
2
2
 
3
+ ## 1.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#152099](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152099)
8
+ [`76e822ba23b83`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/76e822ba23b83) -
9
+ [ED-23460] Allow develops to specify the channel when firing events
10
+
3
11
  ## 1.9.0
4
12
 
5
13
  ### Minor Changes
@@ -152,6 +152,7 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
152
152
  },
153
153
  fireAnalyticsEvent: function fireAnalyticsEvent(payload) {
154
154
  var _api$analytics$shared2, _api$analytics2;
155
+ var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _consts.editorAnalyticsChannel;
155
156
  var _ref6 = (_api$analytics$shared2 = api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.sharedState.currentState()) !== null && _api$analytics$shared2 !== void 0 ? _api$analytics$shared2 : {},
156
157
  createAnalyticsEvent = _ref6.createAnalyticsEvent;
157
158
  if (!createAnalyticsEvent) {
@@ -161,7 +162,8 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
161
162
  return;
162
163
  }
163
164
  (0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
164
- payload: payload
165
+ payload: payload,
166
+ channel: channel
165
167
  });
166
168
  }
167
169
  },
@@ -127,7 +127,7 @@ const analyticsPlugin = ({
127
127
  });
128
128
  return true;
129
129
  },
130
- fireAnalyticsEvent: payload => {
130
+ fireAnalyticsEvent: (payload, channel = editorAnalyticsChannel) => {
131
131
  var _api$analytics$shared2, _api$analytics2;
132
132
  const {
133
133
  createAnalyticsEvent
@@ -139,7 +139,8 @@ const analyticsPlugin = ({
139
139
  return;
140
140
  }
141
141
  fireAnalyticsEvent(createAnalyticsEvent)({
142
- payload
142
+ payload,
143
+ channel
143
144
  });
144
145
  }
145
146
  },
@@ -144,6 +144,7 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
144
144
  },
145
145
  fireAnalyticsEvent: function fireAnalyticsEvent(payload) {
146
146
  var _api$analytics$shared2, _api$analytics2;
147
+ var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : editorAnalyticsChannel;
147
148
  var _ref6 = (_api$analytics$shared2 = api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.sharedState.currentState()) !== null && _api$analytics$shared2 !== void 0 ? _api$analytics$shared2 : {},
148
149
  createAnalyticsEvent = _ref6.createAnalyticsEvent;
149
150
  if (!createAnalyticsEvent) {
@@ -153,7 +154,8 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
153
154
  return;
154
155
  }
155
156
  _fireAnalyticsEvent(createAnalyticsEvent)({
156
- payload: payload
157
+ payload: payload,
158
+ channel: channel
157
159
  });
158
160
  }
159
161
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-analytics",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
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.4",
35
35
  "@atlaskit/analytics-listeners": "^8.11.0",
36
36
  "@atlaskit/analytics-next": "^10.1.0",
37
- "@atlaskit/editor-common": "^93.3.0",
37
+ "@atlaskit/editor-common": "^93.4.0",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
39
39
  "@atlaskit/editor-prosemirror": "6.0.0",
40
40
  "@atlaskit/editor-tables": "^2.8.0",