@atlaskit/editor-plugin-panel 4.3.7 → 4.3.9

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-panel
2
2
 
3
+ ## 4.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.3.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [#149482](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149482)
14
+ [`1f1f73876c3c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f1f73876c3c8) -
15
+ ED-27860 Add analytics for copy and delete button in floating toolbars
16
+ - Updated dependencies
17
+
3
18
  ## 4.3.7
4
19
 
5
20
  ### Patch Changes
@@ -15,6 +15,7 @@ var _panel = require("@atlaskit/editor-common/panel");
15
15
  var _utils = require("@atlaskit/editor-common/utils");
16
16
  var _state = require("@atlaskit/editor-prosemirror/state");
17
17
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  var _utils3 = require("../pm-plugins/utils/utils");
19
20
  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; }
20
21
  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,7 +27,7 @@ var removePanel = exports.removePanel = function removePanel(editorAnalyticsAPI)
26
27
  action: _analytics.ACTION.DELETED,
27
28
  actionSubject: _analytics.ACTION_SUBJECT.PANEL,
28
29
  attributes: {
29
- inputMethod: _analytics.INPUT_METHOD.TOOLBAR
30
+ inputMethod: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? _analytics.INPUT_METHOD.FLOATING_TB : _analytics.INPUT_METHOD.TOOLBAR
30
31
  },
31
32
  eventType: _analytics.EVENT_TYPE.TRACK
32
33
  };
@@ -303,7 +303,7 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
303
303
  onClick: function onClick() {
304
304
  var _api$core, _api$floatingToolbar;
305
305
  api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute( // @ts-ignore
306
- api === null || api === void 0 || (_api$floatingToolbar = api.floatingToolbar) === null || _api$floatingToolbar === void 0 ? void 0 : _api$floatingToolbar.commands.copyNode(panelNodeType));
306
+ api === null || api === void 0 || (_api$floatingToolbar = api.floatingToolbar) === null || _api$floatingToolbar === void 0 ? void 0 : _api$floatingToolbar.commands.copyNode(panelNodeType, _analytics.INPUT_METHOD.FLOATING_TB));
307
307
  return true;
308
308
  },
309
309
  icon: /*#__PURE__*/_react.default.createElement(_copy.default, {
@@ -5,6 +5,7 @@ import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
5
5
  import { wrapSelectionIn } from '@atlaskit/editor-common/utils';
6
6
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { findParentNodeOfType, findSelectedNodeOfType, removeParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { findPanel } from '../pm-plugins/utils/utils';
9
10
  export const removePanel = editorAnalyticsAPI => (state, dispatch) => {
10
11
  const {
@@ -17,7 +18,7 @@ export const removePanel = editorAnalyticsAPI => (state, dispatch) => {
17
18
  action: ACTION.DELETED,
18
19
  actionSubject: ACTION_SUBJECT.PANEL,
19
20
  attributes: {
20
- inputMethod: INPUT_METHOD.TOOLBAR
21
+ inputMethod: fg('platform_editor_controls_patch_analytics_2') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR
21
22
  },
22
23
  eventType: EVENT_TYPE.TRACK
23
24
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PanelType } from '@atlaskit/adf-schema';
3
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
3
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
5
5
  import commonMessages, { panelMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
@@ -281,7 +281,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
281
281
  onClick: () => {
282
282
  var _api$core, _api$floatingToolbar;
283
283
  api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute( // @ts-ignore
284
- api === null || api === void 0 ? void 0 : (_api$floatingToolbar = api.floatingToolbar) === null || _api$floatingToolbar === void 0 ? void 0 : _api$floatingToolbar.commands.copyNode(panelNodeType));
284
+ api === null || api === void 0 ? void 0 : (_api$floatingToolbar = api.floatingToolbar) === null || _api$floatingToolbar === void 0 ? void 0 : _api$floatingToolbar.commands.copyNode(panelNodeType, INPUT_METHOD.FLOATING_TB));
285
285
  return true;
286
286
  },
287
287
  icon: /*#__PURE__*/React.createElement(CopyIcon, {
@@ -8,6 +8,7 @@ import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
8
8
  import { wrapSelectionIn } from '@atlaskit/editor-common/utils';
9
9
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
10
10
  import { findParentNodeOfType, findSelectedNodeOfType, removeParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
11
12
  import { findPanel } from '../pm-plugins/utils/utils';
12
13
  export var removePanel = function removePanel(editorAnalyticsAPI) {
13
14
  return function (state, dispatch) {
@@ -17,7 +18,7 @@ export var removePanel = function removePanel(editorAnalyticsAPI) {
17
18
  action: ACTION.DELETED,
18
19
  actionSubject: ACTION_SUBJECT.PANEL,
19
20
  attributes: {
20
- inputMethod: INPUT_METHOD.TOOLBAR
21
+ inputMethod: fg('platform_editor_controls_patch_analytics_2') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR
21
22
  },
22
23
  eventType: EVENT_TYPE.TRACK
23
24
  };
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  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; }
4
4
  import React from 'react';
5
5
  import { PanelType } from '@atlaskit/adf-schema';
6
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
6
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
7
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
8
8
  import commonMessages, { panelMessages as messages } from '@atlaskit/editor-common/messages';
9
9
  import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
@@ -293,7 +293,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
293
293
  onClick: function onClick() {
294
294
  var _api$core, _api$floatingToolbar;
295
295
  api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute( // @ts-ignore
296
- api === null || api === void 0 || (_api$floatingToolbar = api.floatingToolbar) === null || _api$floatingToolbar === void 0 ? void 0 : _api$floatingToolbar.commands.copyNode(panelNodeType));
296
+ api === null || api === void 0 || (_api$floatingToolbar = api.floatingToolbar) === null || _api$floatingToolbar === void 0 ? void 0 : _api$floatingToolbar.commands.copyNode(panelNodeType, INPUT_METHOD.FLOATING_TB));
297
297
  return true;
298
298
  },
299
299
  icon: /*#__PURE__*/React.createElement(CopyIcon, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "4.3.7",
3
+ "version": "4.3.9",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,19 +32,19 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^47.6.0",
35
- "@atlaskit/editor-common": "^103.4.0",
35
+ "@atlaskit/editor-common": "^104.1.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
39
- "@atlaskit/editor-plugin-emoji": "^3.5.0",
39
+ "@atlaskit/editor-plugin-emoji": "^3.6.0",
40
40
  "@atlaskit/editor-prosemirror": "7.0.0",
41
41
  "@atlaskit/editor-shared-styles": "^3.4.0",
42
- "@atlaskit/emoji": "^69.0.0",
43
- "@atlaskit/icon": "^25.5.0",
42
+ "@atlaskit/emoji": "^69.1.0",
43
+ "@atlaskit/icon": "^26.0.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/theme": "^18.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^4.6.0",
47
- "@atlaskit/tokens": "^4.7.0",
46
+ "@atlaskit/tmp-editor-statsig": "^4.19.0",
47
+ "@atlaskit/tokens": "^4.8.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "uuid": "^3.1.0"
50
50
  },
@@ -101,6 +101,9 @@
101
101
  },
102
102
  "platform_editor_lcm_nested_panel_icon_fix": {
103
103
  "type": "boolean"
104
+ },
105
+ "platform_editor_controls_patch_analytics_2": {
106
+ "type": "boolean"
104
107
  }
105
108
  },
106
109
  "stricter": {