@atlaskit/editor-plugin-panel 4.3.6 → 4.3.8
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 +18 -0
- package/dist/cjs/editor-actions/actions.js +2 -1
- package/dist/cjs/ui/toolbar.js +3 -4
- package/dist/es2019/editor-actions/actions.js +2 -1
- package/dist/es2019/ui/toolbar.js +4 -5
- package/dist/esm/editor-actions/actions.js +2 -1
- package/dist/esm/ui/toolbar.js +4 -5
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 4.3.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149482](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149482)
|
|
8
|
+
[`1f1f73876c3c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f1f73876c3c8) -
|
|
9
|
+
ED-27860 Add analytics for copy and delete button in floating toolbars
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.3.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#139216](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139216)
|
|
17
|
+
[`e8f596d2b1910`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e8f596d2b1910) -
|
|
18
|
+
[ux] Cleaned up platform_editor_controls_patch_1 FG
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 4.3.6
|
|
4
22
|
|
|
5
23
|
### 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
|
};
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -26,7 +26,6 @@ var _successEditorSuccess = _interopRequireDefault(require("@atlaskit/icon/core/
|
|
|
26
26
|
var _warningEditorWarning = _interopRequireDefault(require("@atlaskit/icon/core/migration/warning--editor-warning"));
|
|
27
27
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
28
28
|
var _removeEmoji = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove-emoji"));
|
|
29
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
30
29
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
31
30
|
var _actions = require("../editor-actions/actions");
|
|
32
31
|
var _utils2 = require("../pm-plugins/utils/utils");
|
|
@@ -287,12 +286,12 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
|
|
|
287
286
|
});
|
|
288
287
|
} else {
|
|
289
288
|
var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
|
|
290
|
-
return
|
|
289
|
+
return {
|
|
291
290
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
292
291
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
293
292
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
294
293
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
295
|
-
}
|
|
294
|
+
};
|
|
296
295
|
};
|
|
297
296
|
var overflowMenuConfig = [{
|
|
298
297
|
type: 'separator',
|
|
@@ -304,7 +303,7 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
|
|
|
304
303
|
onClick: function onClick() {
|
|
305
304
|
var _api$core, _api$floatingToolbar;
|
|
306
305
|
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute( // @ts-ignore
|
|
307
|
-
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));
|
|
308
307
|
return true;
|
|
309
308
|
},
|
|
310
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';
|
|
@@ -17,7 +17,6 @@ import SuccessIcon from '@atlaskit/icon/core/migration/success--editor-success';
|
|
|
17
17
|
import WarningIcon from '@atlaskit/icon/core/migration/warning--editor-warning';
|
|
18
18
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
19
19
|
import RemoveEmojiIcon from '@atlaskit/icon/glyph/editor/remove-emoji';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
20
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
22
21
|
import { changePanelType, removePanel } from '../editor-actions/actions';
|
|
23
22
|
import { findPanel } from '../pm-plugins/utils/utils';
|
|
@@ -266,12 +265,12 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
|
|
|
266
265
|
tabIndex: null
|
|
267
266
|
});
|
|
268
267
|
} else {
|
|
269
|
-
const hoverDecorationProps = (nodeType, className) =>
|
|
268
|
+
const hoverDecorationProps = (nodeType, className) => ({
|
|
270
269
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
271
270
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
272
271
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
273
272
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
274
|
-
}
|
|
273
|
+
});
|
|
275
274
|
const overflowMenuConfig = [{
|
|
276
275
|
type: 'separator',
|
|
277
276
|
fullHeight: true
|
|
@@ -282,7 +281,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
|
|
|
282
281
|
onClick: () => {
|
|
283
282
|
var _api$core, _api$floatingToolbar;
|
|
284
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
|
|
285
|
-
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));
|
|
286
285
|
return true;
|
|
287
286
|
},
|
|
288
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
|
};
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -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';
|
|
@@ -20,7 +20,6 @@ import SuccessIcon from '@atlaskit/icon/core/migration/success--editor-success';
|
|
|
20
20
|
import WarningIcon from '@atlaskit/icon/core/migration/warning--editor-warning';
|
|
21
21
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
22
22
|
import RemoveEmojiIcon from '@atlaskit/icon/glyph/editor/remove-emoji';
|
|
23
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
24
23
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
25
24
|
import { changePanelType, removePanel } from '../editor-actions/actions';
|
|
26
25
|
import { findPanel } from '../pm-plugins/utils/utils';
|
|
@@ -277,12 +276,12 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
277
276
|
});
|
|
278
277
|
} else {
|
|
279
278
|
var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
|
|
280
|
-
return
|
|
279
|
+
return {
|
|
281
280
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
282
281
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
283
282
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
284
283
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
285
|
-
}
|
|
284
|
+
};
|
|
286
285
|
};
|
|
287
286
|
var overflowMenuConfig = [{
|
|
288
287
|
type: 'separator',
|
|
@@ -294,7 +293,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
294
293
|
onClick: function onClick() {
|
|
295
294
|
var _api$core, _api$floatingToolbar;
|
|
296
295
|
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute( // @ts-ignore
|
|
297
|
-
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));
|
|
298
297
|
return true;
|
|
299
298
|
},
|
|
300
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.
|
|
3
|
+
"version": "4.3.8",
|
|
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": "^
|
|
35
|
+
"@atlaskit/editor-common": "^104.0.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.
|
|
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.
|
|
43
|
-
"@atlaskit/icon": "^25.
|
|
42
|
+
"@atlaskit/emoji": "^69.1.0",
|
|
43
|
+
"@atlaskit/icon": "^25.6.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/theme": "^18.0.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
47
|
-
"@atlaskit/tokens": "^4.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^4.16.0",
|
|
47
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"uuid": "^3.1.0"
|
|
50
50
|
},
|
|
@@ -99,10 +99,10 @@
|
|
|
99
99
|
"platform_editor_nested_dnd_styles_changes": {
|
|
100
100
|
"type": "boolean"
|
|
101
101
|
},
|
|
102
|
-
"
|
|
102
|
+
"platform_editor_lcm_nested_panel_icon_fix": {
|
|
103
103
|
"type": "boolean"
|
|
104
104
|
},
|
|
105
|
-
"
|
|
105
|
+
"platform_editor_controls_patch_analytics_2": {
|
|
106
106
|
"type": "boolean"
|
|
107
107
|
}
|
|
108
108
|
},
|