@atlaskit/editor-plugin-extension 5.1.1 → 5.1.2
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 +12 -0
- package/dist/cjs/pm-plugins/toolbar.js +32 -17
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +4 -3
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
- package/dist/cjs/ui/SaveIndicator/SaveIndicator.js +5 -4
- package/dist/es2019/pm-plugins/toolbar.js +23 -16
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +3 -2
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
- package/dist/es2019/ui/SaveIndicator/SaveIndicator.js +4 -3
- package/dist/esm/pm-plugins/toolbar.js +31 -16
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -2
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +3 -2
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
- package/dist/esm/ui/SaveIndicator/SaveIndicator.js +4 -3
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 5.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#131500](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131500)
|
|
8
|
+
[`0afe8d0b15393`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0afe8d0b15393) -
|
|
9
|
+
ENGHEALTH-23697 Iconography uplift for editor-plugin-extension
|
|
10
|
+
- [#135110](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/135110)
|
|
11
|
+
[`be99401173db3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/be99401173db3) -
|
|
12
|
+
[ux] Move copy and delete button out of toobar overflow menu for macro
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 5.1.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -18,13 +18,8 @@ var _contentWidthNarrow = _interopRequireDefault(require("@atlaskit/icon/core/co
|
|
|
18
18
|
var _contentWidthWide = _interopRequireDefault(require("@atlaskit/icon/core/content-width-wide"));
|
|
19
19
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
20
20
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
21
|
-
var _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
|
|
22
21
|
var _expandHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/expand-horizontal"));
|
|
23
|
-
var
|
|
24
|
-
var _mediaCenter = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-center"));
|
|
25
|
-
var _mediaFullWidth = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-full-width"));
|
|
26
|
-
var _mediaWide = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-wide"));
|
|
27
|
-
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
22
|
+
var _editEditorEdit = _interopRequireDefault(require("@atlaskit/icon/core/migration/edit--editor-edit"));
|
|
28
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
24
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
30
25
|
var _actions = require("../editor-actions/actions");
|
|
@@ -78,24 +73,39 @@ var breakoutButtonListOptions = function breakoutButtonListOptions(state, format
|
|
|
78
73
|
var layout = nodeWithPos.node.attrs.layout;
|
|
79
74
|
return [{
|
|
80
75
|
type: 'button',
|
|
81
|
-
icon:
|
|
82
|
-
|
|
76
|
+
icon: function icon() {
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_contentWidthNarrow.default, {
|
|
78
|
+
label: formatMessage(_messages.default.layoutFixedWidth),
|
|
79
|
+
spacing: "spacious"
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
iconFallback: _contentWidthNarrow.default,
|
|
83
83
|
onClick: (0, _commands.updateExtensionLayout)('default', editorAnalyticsAPI),
|
|
84
84
|
selected: layout === 'default',
|
|
85
85
|
title: formatMessage(_messages.default.layoutFixedWidth),
|
|
86
86
|
tabIndex: null
|
|
87
87
|
}, {
|
|
88
88
|
type: 'button',
|
|
89
|
-
icon:
|
|
90
|
-
|
|
89
|
+
icon: function icon() {
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_contentWidthWide.default, {
|
|
91
|
+
label: formatMessage(_messages.default.layoutWide),
|
|
92
|
+
spacing: "spacious"
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
iconFallback: _contentWidthWide.default,
|
|
91
96
|
onClick: (0, _commands.updateExtensionLayout)('wide', editorAnalyticsAPI),
|
|
92
97
|
selected: layout === 'wide',
|
|
93
98
|
title: formatMessage(_messages.default.layoutWide),
|
|
94
99
|
tabIndex: null
|
|
95
100
|
}, {
|
|
96
101
|
type: 'button',
|
|
97
|
-
icon:
|
|
98
|
-
|
|
102
|
+
icon: function icon() {
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_expandHorizontal.default, {
|
|
104
|
+
label: formatMessage(_messages.default.layoutFullWidth),
|
|
105
|
+
spacing: "spacious"
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
iconFallback: _expandHorizontal.default,
|
|
99
109
|
onClick: (0, _commands.updateExtensionLayout)('full-width', editorAnalyticsAPI),
|
|
100
110
|
selected: layout === 'full-width',
|
|
101
111
|
title: formatMessage(_messages.default.layoutFullWidth),
|
|
@@ -185,8 +195,8 @@ var editButton = function editButton(formatMessage, extensionState, applyChangeT
|
|
|
185
195
|
var editButtonItems = [{
|
|
186
196
|
id: 'editor.extension.edit',
|
|
187
197
|
type: 'button',
|
|
188
|
-
icon:
|
|
189
|
-
iconFallback:
|
|
198
|
+
icon: _editEditorEdit.default,
|
|
199
|
+
iconFallback: _editEditorEdit.default,
|
|
190
200
|
testId: 'extension-toolbar-edit-button',
|
|
191
201
|
// Taking the latest `updateExtension` from plugin state to avoid race condition @see ED-8501
|
|
192
202
|
onClick: function onClick(state, dispatch, view) {
|
|
@@ -319,7 +329,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
319
329
|
onPositionCalculated: function onPositionCalculated(editorView, nextPos) {
|
|
320
330
|
return calculateToolbarPosition(editorView, nextPos, state, extensionObj);
|
|
321
331
|
},
|
|
322
|
-
items: [].concat((0, _toConsumableArray2.default)(editButtonItems), (0, _toConsumableArray2.default)(breakoutItems), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? [{
|
|
332
|
+
items: [].concat((0, _toConsumableArray2.default)(editButtonItems), (0, _toConsumableArray2.default)(breakoutItems), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_editor_controls', 'control') || (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_2') ? [{
|
|
323
333
|
type: 'separator',
|
|
324
334
|
hidden: editButtonItems.length === 0 && breakoutItems.length === 0
|
|
325
335
|
}, {
|
|
@@ -337,8 +347,13 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
337
347
|
}, {
|
|
338
348
|
id: 'editor.extension.delete',
|
|
339
349
|
type: 'button',
|
|
340
|
-
icon:
|
|
341
|
-
|
|
350
|
+
icon: function icon() {
|
|
351
|
+
return /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
352
|
+
label: formatMessage(_messages.default.remove),
|
|
353
|
+
spacing: "spacious"
|
|
354
|
+
});
|
|
355
|
+
},
|
|
356
|
+
iconFallback: _delete.default,
|
|
342
357
|
appearance: 'danger',
|
|
343
358
|
onClick: (0, _commands.removeExtension)(editorAnalyticsAPI),
|
|
344
359
|
onMouseEnter: (_hoverDecoration5 = hoverDecoration) === null || _hoverDecoration5 === void 0 ? void 0 : _hoverDecoration5(nodeType, true),
|
|
@@ -12,8 +12,8 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _new = require("@atlaskit/button/new");
|
|
14
14
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
15
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
16
|
-
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/
|
|
15
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/chevron-down"));
|
|
16
|
+
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/utility/chevron-right"));
|
|
17
17
|
var _colors = require("@atlaskit/theme/colors");
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -21,7 +21,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
21
21
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
22
22
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
23
23
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
24
|
-
var
|
|
24
|
+
var _addAddCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/add--add-circle"));
|
|
25
25
|
var _primitives = require("@atlaskit/primitives");
|
|
26
26
|
var _sectionMessage = _interopRequireDefault(require("@atlaskit/section-message"));
|
|
27
27
|
var _select = _interopRequireDefault(require("@atlaskit/select"));
|
|
@@ -204,11 +204,12 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
204
204
|
testId: "add-more",
|
|
205
205
|
appearance: "subtle",
|
|
206
206
|
iconBefore: function iconBefore(iconProps) {
|
|
207
|
-
return (0, _react2.jsx)(
|
|
207
|
+
return (0, _react2.jsx)(_addAddCircle.default
|
|
208
208
|
// Ignored via go/ees005
|
|
209
209
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
210
210
|
, (0, _extends2.default)({}, iconProps, {
|
|
211
|
-
|
|
211
|
+
LEGACY_size: "small",
|
|
212
|
+
spacing: "none",
|
|
212
213
|
label: intl.formatMessage(_extensions.configPanelMessages.addField)
|
|
213
214
|
}));
|
|
214
215
|
},
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
12
|
-
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/
|
|
12
|
+
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross-circle"));
|
|
13
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
14
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
15
|
/**
|
|
@@ -63,7 +63,8 @@ var RemovableField = function RemovableField(_ref) {
|
|
|
63
63
|
content: intl.formatMessage(_extensions.configPanelMessages.removeField),
|
|
64
64
|
position: "left"
|
|
65
65
|
}, (0, _react2.jsx)(_crossCircle.default, {
|
|
66
|
-
|
|
66
|
+
LEGACY_size: "small",
|
|
67
|
+
spacing: "none",
|
|
67
68
|
label: intl.formatMessage(_extensions.configPanelMessages.removeField)
|
|
68
69
|
}))));
|
|
69
70
|
};
|
|
@@ -10,7 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
13
|
-
var
|
|
13
|
+
var _successCheckCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/success--check-circle"));
|
|
14
14
|
var _primitives = require("@atlaskit/primitives");
|
|
15
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
16
16
|
/**
|
|
@@ -75,10 +75,11 @@ var SaveIndicator = exports.SaveIndicator = function SaveIndicator(_ref) {
|
|
|
75
75
|
}, (0, _react2.jsx)("div", {
|
|
76
76
|
css: saveIndicatorContentStyles,
|
|
77
77
|
"data-testid": "save-indicator-content"
|
|
78
|
-
}, (0, _react2.jsx)(
|
|
78
|
+
}, (0, _react2.jsx)(_successCheckCircle.default, {
|
|
79
79
|
label: "Saving",
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
color: "var(--ds-icon-success, ".concat(_colors.G300, ")"),
|
|
81
|
+
LEGACY_size: "small",
|
|
82
|
+
spacing: "none"
|
|
82
83
|
}), (0, _react2.jsx)(_primitives.Box, {
|
|
83
84
|
xcss: saveIndicatorTextStyles
|
|
84
85
|
}, (0, _react2.jsx)(_primitives.Text, null, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
@@ -9,13 +9,8 @@ import ContentWidthNarrowIcon from '@atlaskit/icon/core/content-width-narrow';
|
|
|
9
9
|
import ContentWidthWideIcon from '@atlaskit/icon/core/content-width-wide';
|
|
10
10
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
11
11
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
12
|
-
import EditIcon from '@atlaskit/icon/core/edit';
|
|
13
12
|
import ExpandHorizontalIcon from '@atlaskit/icon/core/expand-horizontal';
|
|
14
|
-
import
|
|
15
|
-
import CenterIcon from '@atlaskit/icon/glyph/editor/media-center';
|
|
16
|
-
import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
17
|
-
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
18
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
13
|
+
import EditIcon from '@atlaskit/icon/core/migration/edit--editor-edit';
|
|
19
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
16
|
import { editExtension } from '../editor-actions/actions';
|
|
@@ -80,24 +75,33 @@ const breakoutButtonListOptions = (state, formatMessage, extensionState, breakou
|
|
|
80
75
|
} = nodeWithPos.node.attrs;
|
|
81
76
|
return [{
|
|
82
77
|
type: 'button',
|
|
83
|
-
icon: ContentWidthNarrowIcon,
|
|
84
|
-
|
|
78
|
+
icon: () => /*#__PURE__*/React.createElement(ContentWidthNarrowIcon, {
|
|
79
|
+
label: formatMessage(commonMessages.layoutFixedWidth),
|
|
80
|
+
spacing: "spacious"
|
|
81
|
+
}),
|
|
82
|
+
iconFallback: ContentWidthNarrowIcon,
|
|
85
83
|
onClick: updateExtensionLayout('default', editorAnalyticsAPI),
|
|
86
84
|
selected: layout === 'default',
|
|
87
85
|
title: formatMessage(commonMessages.layoutFixedWidth),
|
|
88
86
|
tabIndex: null
|
|
89
87
|
}, {
|
|
90
88
|
type: 'button',
|
|
91
|
-
icon: ContentWidthWideIcon,
|
|
92
|
-
|
|
89
|
+
icon: () => /*#__PURE__*/React.createElement(ContentWidthWideIcon, {
|
|
90
|
+
label: formatMessage(commonMessages.layoutWide),
|
|
91
|
+
spacing: "spacious"
|
|
92
|
+
}),
|
|
93
|
+
iconFallback: ContentWidthWideIcon,
|
|
93
94
|
onClick: updateExtensionLayout('wide', editorAnalyticsAPI),
|
|
94
95
|
selected: layout === 'wide',
|
|
95
96
|
title: formatMessage(commonMessages.layoutWide),
|
|
96
97
|
tabIndex: null
|
|
97
98
|
}, {
|
|
98
99
|
type: 'button',
|
|
99
|
-
icon: ExpandHorizontalIcon,
|
|
100
|
-
|
|
100
|
+
icon: () => /*#__PURE__*/React.createElement(ExpandHorizontalIcon, {
|
|
101
|
+
label: formatMessage(commonMessages.layoutFullWidth),
|
|
102
|
+
spacing: "spacious"
|
|
103
|
+
}),
|
|
104
|
+
iconFallback: ExpandHorizontalIcon,
|
|
101
105
|
onClick: updateExtensionLayout('full-width', editorAnalyticsAPI),
|
|
102
106
|
selected: layout === 'full-width',
|
|
103
107
|
title: formatMessage(commonMessages.layoutFullWidth),
|
|
@@ -188,7 +192,7 @@ const editButton = (formatMessage, extensionState, applyChangeToContextPanel, ed
|
|
|
188
192
|
id: 'editor.extension.edit',
|
|
189
193
|
type: 'button',
|
|
190
194
|
icon: EditIcon,
|
|
191
|
-
iconFallback:
|
|
195
|
+
iconFallback: EditIcon,
|
|
192
196
|
testId: 'extension-toolbar-edit-button',
|
|
193
197
|
// Taking the latest `updateExtension` from plugin state to avoid race condition @see ED-8501
|
|
194
198
|
onClick: (state, dispatch, view) => {
|
|
@@ -317,7 +321,7 @@ export const getToolbarConfig = ({
|
|
|
317
321
|
getDomRef: () => extensionState.element.parentElement || undefined,
|
|
318
322
|
nodeType,
|
|
319
323
|
onPositionCalculated: (editorView, nextPos) => calculateToolbarPosition(editorView, nextPos, state, extensionObj),
|
|
320
|
-
items: [...editButtonItems, ...breakoutItems, ...(editorExperiment('platform_editor_controls', 'control') ? [{
|
|
324
|
+
items: [...editButtonItems, ...breakoutItems, ...(editorExperiment('platform_editor_controls', 'control') || fg('platform_editor_controls_patch_2') ? [{
|
|
321
325
|
type: 'separator',
|
|
322
326
|
hidden: editButtonItems.length === 0 && breakoutItems.length === 0
|
|
323
327
|
}, {
|
|
@@ -335,8 +339,11 @@ export const getToolbarConfig = ({
|
|
|
335
339
|
}, {
|
|
336
340
|
id: 'editor.extension.delete',
|
|
337
341
|
type: 'button',
|
|
338
|
-
icon: DeleteIcon,
|
|
339
|
-
|
|
342
|
+
icon: () => /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
343
|
+
label: formatMessage(commonMessages.remove),
|
|
344
|
+
spacing: "spacious"
|
|
345
|
+
}),
|
|
346
|
+
iconFallback: DeleteIcon,
|
|
340
347
|
appearance: 'danger',
|
|
341
348
|
onClick: removeExtension(editorAnalyticsAPI),
|
|
342
349
|
onMouseEnter: (_hoverDecoration5 = hoverDecoration) === null || _hoverDecoration5 === void 0 ? void 0 : _hoverDecoration5(nodeType, true),
|
|
@@ -9,8 +9,8 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
10
|
import { IconButton } from '@atlaskit/button/new';
|
|
11
11
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
12
|
-
import ChevronDownIcon from '@atlaskit/icon/
|
|
13
|
-
import ChevronRightIcon from '@atlaskit/icon/
|
|
12
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
|
|
13
|
+
import ChevronRightIcon from '@atlaskit/icon/utility/chevron-right';
|
|
14
14
|
import { N40 } from '@atlaskit/theme/colors';
|
|
15
15
|
const expandContainerStyles = css({
|
|
16
16
|
borderBottom: `1px solid ${`var(--ds-border, ${N40})`}`
|
|
@@ -12,7 +12,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
12
12
|
import Button from '@atlaskit/button/new';
|
|
13
13
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
14
14
|
import Heading from '@atlaskit/heading';
|
|
15
|
-
import AddCircleIcon from '@atlaskit/icon/
|
|
15
|
+
import AddCircleIcon from '@atlaskit/icon/core/migration/add--add-circle';
|
|
16
16
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
17
17
|
import SectionMessage from '@atlaskit/section-message';
|
|
18
18
|
import Select from '@atlaskit/select';
|
|
@@ -171,7 +171,8 @@ class FieldsetField extends React.Component {
|
|
|
171
171
|
// Ignored via go/ees005
|
|
172
172
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
173
173
|
, _extends({}, iconProps, {
|
|
174
|
-
|
|
174
|
+
LEGACY_size: "small",
|
|
175
|
+
spacing: "none",
|
|
175
176
|
label: intl.formatMessage(messages.addField)
|
|
176
177
|
})),
|
|
177
178
|
onClick: () => this.setIsAdding(true)
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
10
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
11
|
-
import CrossCircleIcon from '@atlaskit/icon/
|
|
11
|
+
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
12
12
|
import { N80, R300 } from '@atlaskit/theme/colors';
|
|
13
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
14
|
const removableFieldWrapperStyles = css({
|
|
@@ -54,7 +54,8 @@ const RemovableField = ({
|
|
|
54
54
|
content: intl.formatMessage(messages.removeField),
|
|
55
55
|
position: "left"
|
|
56
56
|
}, jsx(CrossCircleIcon, {
|
|
57
|
-
|
|
57
|
+
LEGACY_size: "small",
|
|
58
|
+
spacing: "none",
|
|
58
59
|
label: intl.formatMessage(messages.removeField)
|
|
59
60
|
}))));
|
|
60
61
|
};
|
|
@@ -8,7 +8,7 @@ import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
11
|
-
import CheckCircleIcon from '@atlaskit/icon/
|
|
11
|
+
import CheckCircleIcon from '@atlaskit/icon/core/migration/success--check-circle';
|
|
12
12
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
13
13
|
import { G300, N0 } from '@atlaskit/theme/colors';
|
|
14
14
|
const noop = () => {};
|
|
@@ -63,8 +63,9 @@ export const SaveIndicator = ({
|
|
|
63
63
|
"data-testid": "save-indicator-content"
|
|
64
64
|
}, jsx(CheckCircleIcon, {
|
|
65
65
|
label: "Saving",
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
color: `var(--ds-icon-success, ${G300})`,
|
|
67
|
+
LEGACY_size: "small",
|
|
68
|
+
spacing: "none"
|
|
68
69
|
}), jsx(Box, {
|
|
69
70
|
xcss: saveIndicatorTextStyles
|
|
70
71
|
}, jsx(Text, null, jsx(FormattedMessage
|
|
@@ -13,13 +13,8 @@ import ContentWidthNarrowIcon from '@atlaskit/icon/core/content-width-narrow';
|
|
|
13
13
|
import ContentWidthWideIcon from '@atlaskit/icon/core/content-width-wide';
|
|
14
14
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
15
15
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
16
|
-
import EditIcon from '@atlaskit/icon/core/edit';
|
|
17
16
|
import ExpandHorizontalIcon from '@atlaskit/icon/core/expand-horizontal';
|
|
18
|
-
import
|
|
19
|
-
import CenterIcon from '@atlaskit/icon/glyph/editor/media-center';
|
|
20
|
-
import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
21
|
-
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
22
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
17
|
+
import EditIcon from '@atlaskit/icon/core/migration/edit--editor-edit';
|
|
23
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
24
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
25
20
|
import { editExtension } from '../editor-actions/actions';
|
|
@@ -72,24 +67,39 @@ var breakoutButtonListOptions = function breakoutButtonListOptions(state, format
|
|
|
72
67
|
var layout = nodeWithPos.node.attrs.layout;
|
|
73
68
|
return [{
|
|
74
69
|
type: 'button',
|
|
75
|
-
icon:
|
|
76
|
-
|
|
70
|
+
icon: function icon() {
|
|
71
|
+
return /*#__PURE__*/React.createElement(ContentWidthNarrowIcon, {
|
|
72
|
+
label: formatMessage(commonMessages.layoutFixedWidth),
|
|
73
|
+
spacing: "spacious"
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
iconFallback: ContentWidthNarrowIcon,
|
|
77
77
|
onClick: updateExtensionLayout('default', editorAnalyticsAPI),
|
|
78
78
|
selected: layout === 'default',
|
|
79
79
|
title: formatMessage(commonMessages.layoutFixedWidth),
|
|
80
80
|
tabIndex: null
|
|
81
81
|
}, {
|
|
82
82
|
type: 'button',
|
|
83
|
-
icon:
|
|
84
|
-
|
|
83
|
+
icon: function icon() {
|
|
84
|
+
return /*#__PURE__*/React.createElement(ContentWidthWideIcon, {
|
|
85
|
+
label: formatMessage(commonMessages.layoutWide),
|
|
86
|
+
spacing: "spacious"
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
iconFallback: ContentWidthWideIcon,
|
|
85
90
|
onClick: updateExtensionLayout('wide', editorAnalyticsAPI),
|
|
86
91
|
selected: layout === 'wide',
|
|
87
92
|
title: formatMessage(commonMessages.layoutWide),
|
|
88
93
|
tabIndex: null
|
|
89
94
|
}, {
|
|
90
95
|
type: 'button',
|
|
91
|
-
icon:
|
|
92
|
-
|
|
96
|
+
icon: function icon() {
|
|
97
|
+
return /*#__PURE__*/React.createElement(ExpandHorizontalIcon, {
|
|
98
|
+
label: formatMessage(commonMessages.layoutFullWidth),
|
|
99
|
+
spacing: "spacious"
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
iconFallback: ExpandHorizontalIcon,
|
|
93
103
|
onClick: updateExtensionLayout('full-width', editorAnalyticsAPI),
|
|
94
104
|
selected: layout === 'full-width',
|
|
95
105
|
title: formatMessage(commonMessages.layoutFullWidth),
|
|
@@ -180,7 +190,7 @@ var editButton = function editButton(formatMessage, extensionState, applyChangeT
|
|
|
180
190
|
id: 'editor.extension.edit',
|
|
181
191
|
type: 'button',
|
|
182
192
|
icon: EditIcon,
|
|
183
|
-
iconFallback:
|
|
193
|
+
iconFallback: EditIcon,
|
|
184
194
|
testId: 'extension-toolbar-edit-button',
|
|
185
195
|
// Taking the latest `updateExtension` from plugin state to avoid race condition @see ED-8501
|
|
186
196
|
onClick: function onClick(state, dispatch, view) {
|
|
@@ -313,7 +323,7 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
313
323
|
onPositionCalculated: function onPositionCalculated(editorView, nextPos) {
|
|
314
324
|
return calculateToolbarPosition(editorView, nextPos, state, extensionObj);
|
|
315
325
|
},
|
|
316
|
-
items: [].concat(_toConsumableArray(editButtonItems), _toConsumableArray(breakoutItems), _toConsumableArray(editorExperiment('platform_editor_controls', 'control') ? [{
|
|
326
|
+
items: [].concat(_toConsumableArray(editButtonItems), _toConsumableArray(breakoutItems), _toConsumableArray(editorExperiment('platform_editor_controls', 'control') || fg('platform_editor_controls_patch_2') ? [{
|
|
317
327
|
type: 'separator',
|
|
318
328
|
hidden: editButtonItems.length === 0 && breakoutItems.length === 0
|
|
319
329
|
}, {
|
|
@@ -331,8 +341,13 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
331
341
|
}, {
|
|
332
342
|
id: 'editor.extension.delete',
|
|
333
343
|
type: 'button',
|
|
334
|
-
icon:
|
|
335
|
-
|
|
344
|
+
icon: function icon() {
|
|
345
|
+
return /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
346
|
+
label: formatMessage(commonMessages.remove),
|
|
347
|
+
spacing: "spacious"
|
|
348
|
+
});
|
|
349
|
+
},
|
|
350
|
+
iconFallback: DeleteIcon,
|
|
336
351
|
appearance: 'danger',
|
|
337
352
|
onClick: removeExtension(editorAnalyticsAPI),
|
|
338
353
|
onMouseEnter: (_hoverDecoration5 = hoverDecoration) === null || _hoverDecoration5 === void 0 ? void 0 : _hoverDecoration5(nodeType, true),
|
|
@@ -10,8 +10,8 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { IconButton } from '@atlaskit/button/new';
|
|
12
12
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
13
|
-
import ChevronDownIcon from '@atlaskit/icon/
|
|
14
|
-
import ChevronRightIcon from '@atlaskit/icon/
|
|
13
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
|
|
14
|
+
import ChevronRightIcon from '@atlaskit/icon/utility/chevron-right';
|
|
15
15
|
import { N40 } from '@atlaskit/theme/colors';
|
|
16
16
|
var expandContainerStyles = css({
|
|
17
17
|
borderBottom: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
|
|
@@ -23,7 +23,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
23
23
|
import Button from '@atlaskit/button/new';
|
|
24
24
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
25
25
|
import Heading from '@atlaskit/heading';
|
|
26
|
-
import AddCircleIcon from '@atlaskit/icon/
|
|
26
|
+
import AddCircleIcon from '@atlaskit/icon/core/migration/add--add-circle';
|
|
27
27
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
28
28
|
import SectionMessage from '@atlaskit/section-message';
|
|
29
29
|
import Select from '@atlaskit/select';
|
|
@@ -201,7 +201,8 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
201
201
|
// Ignored via go/ees005
|
|
202
202
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
203
203
|
, _extends({}, iconProps, {
|
|
204
|
-
|
|
204
|
+
LEGACY_size: "small",
|
|
205
|
+
spacing: "none",
|
|
205
206
|
label: intl.formatMessage(messages.addField)
|
|
206
207
|
}));
|
|
207
208
|
},
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
10
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
11
|
-
import CrossCircleIcon from '@atlaskit/icon/
|
|
11
|
+
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
12
12
|
import { N80, R300 } from '@atlaskit/theme/colors';
|
|
13
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
14
|
var removableFieldWrapperStyles = css({
|
|
@@ -55,7 +55,8 @@ var RemovableField = function RemovableField(_ref) {
|
|
|
55
55
|
content: intl.formatMessage(messages.removeField),
|
|
56
56
|
position: "left"
|
|
57
57
|
}, jsx(CrossCircleIcon, {
|
|
58
|
-
|
|
58
|
+
LEGACY_size: "small",
|
|
59
|
+
spacing: "none",
|
|
59
60
|
label: intl.formatMessage(messages.removeField)
|
|
60
61
|
}))));
|
|
61
62
|
};
|
|
@@ -9,7 +9,7 @@ import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
11
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
12
|
-
import CheckCircleIcon from '@atlaskit/icon/
|
|
12
|
+
import CheckCircleIcon from '@atlaskit/icon/core/migration/success--check-circle';
|
|
13
13
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
14
14
|
import { G300, N0 } from '@atlaskit/theme/colors';
|
|
15
15
|
var noop = function noop() {};
|
|
@@ -69,8 +69,9 @@ export var SaveIndicator = function SaveIndicator(_ref) {
|
|
|
69
69
|
"data-testid": "save-indicator-content"
|
|
70
70
|
}, jsx(CheckCircleIcon, {
|
|
71
71
|
label: "Saving",
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
color: "var(--ds-icon-success, ".concat(G300, ")"),
|
|
73
|
+
LEGACY_size: "small",
|
|
74
|
+
spacing: "none"
|
|
74
75
|
}), jsx(Box, {
|
|
75
76
|
xcss: saveIndicatorTextStyles
|
|
76
77
|
}, jsx(Text, null, jsx(FormattedMessage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@atlaskit/adf-utils": "^19.19.0",
|
|
30
30
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
31
31
|
"@atlaskit/avatar": "^25.0.0",
|
|
32
|
-
"@atlaskit/button": "^
|
|
32
|
+
"@atlaskit/button": "^23.0.0",
|
|
33
33
|
"@atlaskit/checkbox": "^17.0.0",
|
|
34
34
|
"@atlaskit/datetime-picker": "^16.2.0",
|
|
35
|
-
"@atlaskit/editor-common": "^102.
|
|
35
|
+
"@atlaskit/editor-common": "^102.16.0",
|
|
36
36
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-context-identifier": "^2.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/empty-state": "^9.0.0",
|
|
47
47
|
"@atlaskit/form": "^12.0.0",
|
|
48
48
|
"@atlaskit/heading": "^5.1.0",
|
|
49
|
-
"@atlaskit/icon": "^25.
|
|
49
|
+
"@atlaskit/icon": "^25.4.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/primitives": "^14.2.0",
|
|
52
52
|
"@atlaskit/radio": "^8.0.0",
|
|
@@ -123,6 +123,9 @@
|
|
|
123
123
|
},
|
|
124
124
|
"platform_editor_controls_patch_1": {
|
|
125
125
|
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
"platform_editor_controls_patch_2": {
|
|
128
|
+
"type": "boolean"
|
|
126
129
|
}
|
|
127
130
|
},
|
|
128
131
|
"stricter": {
|