@atlaskit/editor-plugin-extension 4.0.2 → 4.0.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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 4.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#117485](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/117485)
|
|
14
|
+
[`e9a8d9ba26963`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e9a8d9ba26963) -
|
|
15
|
+
Reorder icons, and remove some based on new editor controls. Changes under
|
|
16
|
+
`editor_plugin_controls` experiment.
|
|
17
|
+
|
|
3
18
|
## 4.0.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -22,6 +22,7 @@ var _mediaFullWidth = _interopRequireDefault(require("@atlaskit/icon/glyph/edito
|
|
|
22
22
|
var _mediaWide = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-wide"));
|
|
23
23
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
24
24
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
25
26
|
var _actions = require("../editor-actions/actions");
|
|
26
27
|
var _commands = require("../editor-commands/commands");
|
|
27
28
|
var _pluginKey = require("./macro/plugin-key");
|
|
@@ -122,7 +123,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
122
123
|
editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti = extensionApi.analytics) === null || _extensionApi$analyti === void 0 ? void 0 : _extensionApi$analyti.actions;
|
|
123
124
|
}
|
|
124
125
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
125
|
-
var _hoverDecoration, _hoverDecoration2, _hoverDecoration3, _hoverDecoration4;
|
|
126
|
+
var _hoverDecoration, _hoverDecoration2, _hoverDecoration3, _hoverDecoration4, _hoverDecoration5, _hoverDecoration6, _hoverDecoration7, _hoverDecoration8;
|
|
126
127
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
127
128
|
var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
128
129
|
var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI);
|
|
@@ -198,7 +199,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
198
199
|
}, {
|
|
199
200
|
type: 'extensions-placeholder',
|
|
200
201
|
separator: 'end'
|
|
201
|
-
}, {
|
|
202
|
+
}], (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? [{
|
|
202
203
|
type: 'copy-button',
|
|
203
204
|
items: [{
|
|
204
205
|
state: state,
|
|
@@ -222,7 +223,31 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
222
223
|
title: formatMessage(_messages.default.remove),
|
|
223
224
|
tabIndex: null,
|
|
224
225
|
confirmDialog: confirmDialog
|
|
225
|
-
}]
|
|
226
|
+
}] : [{
|
|
227
|
+
id: 'editor.extension.delete',
|
|
228
|
+
type: 'button',
|
|
229
|
+
icon: _delete.default,
|
|
230
|
+
iconFallback: _remove.default,
|
|
231
|
+
appearance: 'danger',
|
|
232
|
+
onClick: (0, _commands.removeExtension)(editorAnalyticsAPI),
|
|
233
|
+
onMouseEnter: (_hoverDecoration5 = hoverDecoration) === null || _hoverDecoration5 === void 0 ? void 0 : _hoverDecoration5(nodeType, true),
|
|
234
|
+
onMouseLeave: (_hoverDecoration6 = hoverDecoration) === null || _hoverDecoration6 === void 0 ? void 0 : _hoverDecoration6(nodeType, false),
|
|
235
|
+
onFocus: (_hoverDecoration7 = hoverDecoration) === null || _hoverDecoration7 === void 0 ? void 0 : _hoverDecoration7(nodeType, true),
|
|
236
|
+
onBlur: (_hoverDecoration8 = hoverDecoration) === null || _hoverDecoration8 === void 0 ? void 0 : _hoverDecoration8(nodeType, false),
|
|
237
|
+
focusEditoronEnter: true,
|
|
238
|
+
title: formatMessage(_messages.default.remove),
|
|
239
|
+
tabIndex: null,
|
|
240
|
+
confirmDialog: confirmDialog
|
|
241
|
+
}, {
|
|
242
|
+
type: 'separator'
|
|
243
|
+
}, {
|
|
244
|
+
type: 'copy-button',
|
|
245
|
+
items: [{
|
|
246
|
+
state: state,
|
|
247
|
+
formatMessage: intl.formatMessage,
|
|
248
|
+
nodeType: nodeType
|
|
249
|
+
}]
|
|
250
|
+
}])),
|
|
226
251
|
scrollable: true
|
|
227
252
|
};
|
|
228
253
|
}
|
|
@@ -14,6 +14,7 @@ import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
|
14
14
|
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
15
15
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
18
|
import { editExtension } from '../editor-actions/actions';
|
|
18
19
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from '../editor-commands/commands';
|
|
19
20
|
import { pluginKey as macroPluginKey } from './macro/plugin-key';
|
|
@@ -123,7 +124,7 @@ export const getToolbarConfig = ({
|
|
|
123
124
|
editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$analyti = extensionApi.analytics) === null || _extensionApi$analyti === void 0 ? void 0 : _extensionApi$analyti.actions;
|
|
124
125
|
}
|
|
125
126
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
126
|
-
var _hoverDecoration, _hoverDecoration2, _hoverDecoration3, _hoverDecoration4;
|
|
127
|
+
var _hoverDecoration, _hoverDecoration2, _hoverDecoration3, _hoverDecoration4, _hoverDecoration5, _hoverDecoration6, _hoverDecoration7, _hoverDecoration8;
|
|
127
128
|
const nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
128
129
|
const editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
129
130
|
const breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI);
|
|
@@ -195,7 +196,7 @@ export const getToolbarConfig = ({
|
|
|
195
196
|
}, {
|
|
196
197
|
type: 'extensions-placeholder',
|
|
197
198
|
separator: 'end'
|
|
198
|
-
}, {
|
|
199
|
+
}, ...(editorExperiment('platform_editor_controls', 'control') ? [{
|
|
199
200
|
type: 'copy-button',
|
|
200
201
|
items: [{
|
|
201
202
|
state,
|
|
@@ -219,7 +220,31 @@ export const getToolbarConfig = ({
|
|
|
219
220
|
title: formatMessage(commonMessages.remove),
|
|
220
221
|
tabIndex: null,
|
|
221
222
|
confirmDialog
|
|
222
|
-
}]
|
|
223
|
+
}] : [{
|
|
224
|
+
id: 'editor.extension.delete',
|
|
225
|
+
type: 'button',
|
|
226
|
+
icon: DeleteIcon,
|
|
227
|
+
iconFallback: RemoveIcon,
|
|
228
|
+
appearance: 'danger',
|
|
229
|
+
onClick: removeExtension(editorAnalyticsAPI),
|
|
230
|
+
onMouseEnter: (_hoverDecoration5 = hoverDecoration) === null || _hoverDecoration5 === void 0 ? void 0 : _hoverDecoration5(nodeType, true),
|
|
231
|
+
onMouseLeave: (_hoverDecoration6 = hoverDecoration) === null || _hoverDecoration6 === void 0 ? void 0 : _hoverDecoration6(nodeType, false),
|
|
232
|
+
onFocus: (_hoverDecoration7 = hoverDecoration) === null || _hoverDecoration7 === void 0 ? void 0 : _hoverDecoration7(nodeType, true),
|
|
233
|
+
onBlur: (_hoverDecoration8 = hoverDecoration) === null || _hoverDecoration8 === void 0 ? void 0 : _hoverDecoration8(nodeType, false),
|
|
234
|
+
focusEditoronEnter: true,
|
|
235
|
+
title: formatMessage(commonMessages.remove),
|
|
236
|
+
tabIndex: null,
|
|
237
|
+
confirmDialog
|
|
238
|
+
}, {
|
|
239
|
+
type: 'separator'
|
|
240
|
+
}, {
|
|
241
|
+
type: 'copy-button',
|
|
242
|
+
items: [{
|
|
243
|
+
state,
|
|
244
|
+
formatMessage: intl.formatMessage,
|
|
245
|
+
nodeType
|
|
246
|
+
}]
|
|
247
|
+
}])],
|
|
223
248
|
scrollable: true
|
|
224
249
|
};
|
|
225
250
|
}
|
|
@@ -15,6 +15,7 @@ import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
|
15
15
|
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
16
16
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
19
|
import { editExtension } from '../editor-actions/actions';
|
|
19
20
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from '../editor-commands/commands';
|
|
20
21
|
import { pluginKey as macroPluginKey } from './macro/plugin-key';
|
|
@@ -115,7 +116,7 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
115
116
|
editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti = extensionApi.analytics) === null || _extensionApi$analyti === void 0 ? void 0 : _extensionApi$analyti.actions;
|
|
116
117
|
}
|
|
117
118
|
if (extensionState && !extensionState.showContextPanel && extensionState.element) {
|
|
118
|
-
var _hoverDecoration, _hoverDecoration2, _hoverDecoration3, _hoverDecoration4;
|
|
119
|
+
var _hoverDecoration, _hoverDecoration2, _hoverDecoration3, _hoverDecoration4, _hoverDecoration5, _hoverDecoration6, _hoverDecoration7, _hoverDecoration8;
|
|
119
120
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
120
121
|
var editButtonArray = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI);
|
|
121
122
|
var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI);
|
|
@@ -191,7 +192,7 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
191
192
|
}, {
|
|
192
193
|
type: 'extensions-placeholder',
|
|
193
194
|
separator: 'end'
|
|
194
|
-
}, {
|
|
195
|
+
}], _toConsumableArray(editorExperiment('platform_editor_controls', 'control') ? [{
|
|
195
196
|
type: 'copy-button',
|
|
196
197
|
items: [{
|
|
197
198
|
state: state,
|
|
@@ -215,7 +216,31 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
215
216
|
title: formatMessage(commonMessages.remove),
|
|
216
217
|
tabIndex: null,
|
|
217
218
|
confirmDialog: confirmDialog
|
|
218
|
-
}]
|
|
219
|
+
}] : [{
|
|
220
|
+
id: 'editor.extension.delete',
|
|
221
|
+
type: 'button',
|
|
222
|
+
icon: DeleteIcon,
|
|
223
|
+
iconFallback: RemoveIcon,
|
|
224
|
+
appearance: 'danger',
|
|
225
|
+
onClick: removeExtension(editorAnalyticsAPI),
|
|
226
|
+
onMouseEnter: (_hoverDecoration5 = hoverDecoration) === null || _hoverDecoration5 === void 0 ? void 0 : _hoverDecoration5(nodeType, true),
|
|
227
|
+
onMouseLeave: (_hoverDecoration6 = hoverDecoration) === null || _hoverDecoration6 === void 0 ? void 0 : _hoverDecoration6(nodeType, false),
|
|
228
|
+
onFocus: (_hoverDecoration7 = hoverDecoration) === null || _hoverDecoration7 === void 0 ? void 0 : _hoverDecoration7(nodeType, true),
|
|
229
|
+
onBlur: (_hoverDecoration8 = hoverDecoration) === null || _hoverDecoration8 === void 0 ? void 0 : _hoverDecoration8(nodeType, false),
|
|
230
|
+
focusEditoronEnter: true,
|
|
231
|
+
title: formatMessage(commonMessages.remove),
|
|
232
|
+
tabIndex: null,
|
|
233
|
+
confirmDialog: confirmDialog
|
|
234
|
+
}, {
|
|
235
|
+
type: 'separator'
|
|
236
|
+
}, {
|
|
237
|
+
type: 'copy-button',
|
|
238
|
+
items: [{
|
|
239
|
+
state: state,
|
|
240
|
+
formatMessage: intl.formatMessage,
|
|
241
|
+
nodeType: nodeType
|
|
242
|
+
}]
|
|
243
|
+
}])),
|
|
219
244
|
scrollable: true
|
|
220
245
|
};
|
|
221
246
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
29
29
|
"@atlaskit/avatar": "^23.0.0",
|
|
30
30
|
"@atlaskit/button": "^21.1.0",
|
|
31
|
-
"@atlaskit/checkbox": "^
|
|
31
|
+
"@atlaskit/checkbox": "^17.0.0",
|
|
32
32
|
"@atlaskit/datetime-picker": "^16.0.0",
|
|
33
|
-
"@atlaskit/editor-common": "^100.
|
|
33
|
+
"@atlaskit/editor-common": "^100.2.0",
|
|
34
34
|
"@atlaskit/editor-json-transformer": "^8.23.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^2.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-context-identifier": "^2.0.0",
|