@atlaskit/editor-plugin-extension 3.0.6 → 3.1.1
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 +14 -0
- package/dist/cjs/editor-actions/actions.js +3 -12
- package/dist/cjs/pm-plugins/main.js +1 -6
- package/dist/cjs/pm-plugins/toolbar.js +2 -8
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +1 -4
- package/dist/cjs/ui/ConfigPanel/Header.js +2 -2
- package/dist/cjs/ui/context-panel.js +0 -2
- package/dist/es2019/editor-actions/actions.js +3 -12
- package/dist/es2019/pm-plugins/main.js +1 -6
- package/dist/es2019/pm-plugins/toolbar.js +2 -8
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +1 -4
- package/dist/es2019/ui/ConfigPanel/Header.js +1 -1
- package/dist/es2019/ui/ConfigPanel/transformers.js +2 -8
- package/dist/es2019/ui/context-panel.js +0 -2
- package/dist/esm/editor-actions/actions.js +3 -12
- package/dist/esm/pm-plugins/main.js +1 -6
- package/dist/esm/pm-plugins/toolbar.js +2 -8
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -4
- package/dist/esm/ui/ConfigPanel/Header.js +1 -1
- package/dist/esm/ui/context-panel.js +0 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 3.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#105571](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105571)
|
|
14
|
+
[`1b70990bb34c2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1b70990bb34c2) -
|
|
15
|
+
migrate config panel's close button icon
|
|
16
|
+
|
|
3
17
|
## 3.0.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -16,10 +16,7 @@ var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
|
16
16
|
var _utils2 = require("../pm-plugins/utils");
|
|
17
17
|
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; }
|
|
18
18
|
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; }
|
|
19
|
-
var buildExtensionNode = exports.buildExtensionNode = function buildExtensionNode(type, schema, attrs, content, marks
|
|
20
|
-
// Ignored via go/ees005
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
22
|
-
) {
|
|
19
|
+
var buildExtensionNode = exports.buildExtensionNode = function buildExtensionNode(type, schema, attrs, content, marks) {
|
|
23
20
|
switch (type) {
|
|
24
21
|
case 'extension':
|
|
25
22
|
return schema.nodes.extension.createChecked(attrs, content, marks);
|
|
@@ -32,10 +29,7 @@ var buildExtensionNode = exports.buildExtensionNode = function buildExtensionNod
|
|
|
32
29
|
}
|
|
33
30
|
};
|
|
34
31
|
var performNodeUpdate = exports.performNodeUpdate = function performNodeUpdate(editorAnalyticsAPI) {
|
|
35
|
-
return function (type, newAttrs, content, marks, shouldScrollIntoView
|
|
36
|
-
// Ignored via go/ees005
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
38
|
-
) {
|
|
32
|
+
return function (type, newAttrs, content, marks, shouldScrollIntoView) {
|
|
39
33
|
return function (_state, _dispatch, view) {
|
|
40
34
|
if (!view) {
|
|
41
35
|
throw Error('EditorView is required to perform node update!');
|
|
@@ -178,10 +172,7 @@ var updateExtensionParams = function updateExtensionParams(editorAnalyticsAPI) {
|
|
|
178
172
|
}();
|
|
179
173
|
};
|
|
180
174
|
};
|
|
181
|
-
var editExtension = exports.editExtension = function editExtension(macroProvider, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension
|
|
182
|
-
// Ignored via go/ees005
|
|
183
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
184
|
-
) {
|
|
175
|
+
var editExtension = exports.editExtension = function editExtension(macroProvider, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension) {
|
|
185
176
|
return function (state, dispatch, view) {
|
|
186
177
|
if (!view) {
|
|
187
178
|
return false;
|
|
@@ -173,10 +173,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
173
173
|
var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
|
|
174
174
|
var featureFlags = arguments.length > 8 ? arguments[8] : undefined;
|
|
175
175
|
var allowDragAndDrop = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : true;
|
|
176
|
-
var __rendererExtensionOptions
|
|
177
|
-
// Ignored via go/ees005
|
|
178
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
179
|
-
= arguments.length > 10 ? arguments[10] : undefined;
|
|
176
|
+
var __rendererExtensionOptions = arguments.length > 10 ? arguments[10] : undefined;
|
|
180
177
|
var state = (0, _pluginFactory.createPluginState)(dispatch, {
|
|
181
178
|
showEditButton: false,
|
|
182
179
|
showContextPanel: false
|
|
@@ -320,8 +317,6 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
320
317
|
{
|
|
321
318
|
useLongPressSelection: useLongPressSelection
|
|
322
319
|
}),
|
|
323
|
-
// Ignored via go/ees005
|
|
324
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
325
320
|
handleDrop: function handleDrop(view, event, slice, moved) {
|
|
326
321
|
if ((0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro')) {
|
|
327
322
|
if (!allowDragAndDrop) {
|
|
@@ -47,10 +47,7 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
47
47
|
// and not inside a layoutSection
|
|
48
48
|
return !!((isMultiBodiedExtension || isNonEmbeddedBodiedExtension || isNonEmbeddedExtension) && !(0, _utils2.hasParentNodeOfType)([layoutSection])(selection));
|
|
49
49
|
};
|
|
50
|
-
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI
|
|
51
|
-
// Ignored via go/ees005
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
53
|
-
) {
|
|
50
|
+
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI) {
|
|
54
51
|
var nodeWithPos = (0, _utils3.getSelectedExtension)(state, true);
|
|
55
52
|
|
|
56
53
|
// we should only return breakout options when breakouts are enabled and the node supports them
|
|
@@ -84,10 +81,7 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
84
81
|
}
|
|
85
82
|
return [];
|
|
86
83
|
};
|
|
87
|
-
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI
|
|
88
|
-
// Ignored via go/ees005
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
90
|
-
) {
|
|
84
|
+
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
91
85
|
if (!extensionState.showEditButton) {
|
|
92
86
|
return [];
|
|
93
87
|
}
|
|
@@ -145,10 +145,7 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
145
145
|
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
146
146
|
// workaround for DST-2697, remove this function once fix.
|
|
147
147
|
(0, _defineProperty2.default)(_this, "backfillTabFormData", function (fields, formData, currentParameters) {
|
|
148
|
-
var getRelevantData = function getRelevantData(field, formParams, currentParams, backfill
|
|
149
|
-
// Ignored via go/ees005
|
|
150
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
151
|
-
) {
|
|
148
|
+
var getRelevantData = function getRelevantData(field, formParams, currentParams, backfill) {
|
|
152
149
|
if (field.hasGroupedValues && !(field.name in backfill)) {
|
|
153
150
|
backfill[field.name] = {};
|
|
154
151
|
}
|
|
@@ -11,7 +11,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
11
11
|
var _new = require("@atlaskit/button/new");
|
|
12
12
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
13
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
14
|
-
var
|
|
14
|
+
var _closeCross = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--cross"));
|
|
15
15
|
var _primitives = require("@atlaskit/primitives");
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -138,7 +138,7 @@ var Header = function Header(_ref) {
|
|
|
138
138
|
appearance: "subtle",
|
|
139
139
|
testId: "config-panel-header-close-button",
|
|
140
140
|
label: intl.formatMessage(_extensions.configPanelMessages.close),
|
|
141
|
-
icon:
|
|
141
|
+
icon: _closeCross.default,
|
|
142
142
|
onClick: onClose
|
|
143
143
|
}))), (description || documentationUrl) && (0, _react2.jsx)(_primitives.Box, {
|
|
144
144
|
xcss: descriptionStyles
|
|
@@ -152,8 +152,6 @@ var getContextPanel = exports.getContextPanel = function getContextPanel(getEdit
|
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
// Added this interface to handle the macroParams on Parameters
|
|
155
|
-
// Ignored via go/ees005
|
|
156
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
157
155
|
function onChangeAction(_x2) {
|
|
158
156
|
return _onChangeAction.apply(this, arguments);
|
|
159
157
|
}
|
|
@@ -4,10 +4,7 @@ import { findSelectedNodeOfType, replaceParentNodeOfType, replaceSelectedNode }
|
|
|
4
4
|
import { createExtensionAPI, getEditInLegacyMacroBrowser } from '../pm-plugins/extension-api';
|
|
5
5
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
6
6
|
import { findExtensionWithLocalId } from '../pm-plugins/utils';
|
|
7
|
-
export const buildExtensionNode = (type, schema, attrs, content, marks
|
|
8
|
-
// Ignored via go/ees005
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
10
|
-
) => {
|
|
7
|
+
export const buildExtensionNode = (type, schema, attrs, content, marks) => {
|
|
11
8
|
switch (type) {
|
|
12
9
|
case 'extension':
|
|
13
10
|
return schema.nodes.extension.createChecked(attrs, content, marks);
|
|
@@ -19,10 +16,7 @@ export const buildExtensionNode = (type, schema, attrs, content, marks
|
|
|
19
16
|
return schema.nodes.multiBodiedExtension.create(attrs, content, marks);
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
|
-
export const performNodeUpdate = editorAnalyticsAPI => (type, newAttrs, content, marks, shouldScrollIntoView
|
|
23
|
-
// Ignored via go/ees005
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
25
|
-
) => (_state, _dispatch, view) => {
|
|
19
|
+
export const performNodeUpdate = editorAnalyticsAPI => (type, newAttrs, content, marks, shouldScrollIntoView) => (_state, _dispatch, view) => {
|
|
26
20
|
if (!view) {
|
|
27
21
|
throw Error('EditorView is required to perform node update!');
|
|
28
22
|
}
|
|
@@ -152,10 +146,7 @@ const updateExtensionParams = editorAnalyticsAPI => (updateExtension, node, acti
|
|
|
152
146
|
} catch {}
|
|
153
147
|
return true;
|
|
154
148
|
};
|
|
155
|
-
export const editExtension = (macroProvider, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension
|
|
156
|
-
// Ignored via go/ees005
|
|
157
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
158
|
-
) => (state, dispatch, view) => {
|
|
149
|
+
export const editExtension = (macroProvider, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension) => (state, dispatch, view) => {
|
|
159
150
|
if (!view) {
|
|
160
151
|
return false;
|
|
161
152
|
}
|
|
@@ -115,10 +115,7 @@ export const handleUpdate = ({
|
|
|
115
115
|
}
|
|
116
116
|
return true;
|
|
117
117
|
};
|
|
118
|
-
export const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}, featureFlags, allowDragAndDrop = true, __rendererExtensionOptions
|
|
119
|
-
// Ignored via go/ees005
|
|
120
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
121
|
-
) => {
|
|
118
|
+
export const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}, featureFlags, allowDragAndDrop = true, __rendererExtensionOptions) => {
|
|
122
119
|
var _featureFlags$macroIn;
|
|
123
120
|
const state = createPluginState(dispatch, {
|
|
124
121
|
showEditButton: false,
|
|
@@ -273,8 +270,6 @@ export const createPlugin = (dispatch, providerFactory, extensionHandlers, porta
|
|
|
273
270
|
{
|
|
274
271
|
useLongPressSelection
|
|
275
272
|
}),
|
|
276
|
-
// Ignored via go/ees005
|
|
277
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
278
273
|
handleDrop(view, event, slice, moved) {
|
|
279
274
|
if (fg('platform_editor_legacy_content_macro')) {
|
|
280
275
|
if (!allowDragAndDrop) {
|
|
@@ -44,10 +44,7 @@ const isLayoutSupported = (state, selectedExtNode) => {
|
|
|
44
44
|
// and not inside a layoutSection
|
|
45
45
|
return !!((isMultiBodiedExtension || isNonEmbeddedBodiedExtension || isNonEmbeddedExtension) && !hasParentNodeOfType([layoutSection])(selection));
|
|
46
46
|
};
|
|
47
|
-
const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI
|
|
48
|
-
// Ignored via go/ees005
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
50
|
-
) => {
|
|
47
|
+
const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI) => {
|
|
51
48
|
const nodeWithPos = getSelectedExtension(state, true);
|
|
52
49
|
|
|
53
50
|
// we should only return breakout options when breakouts are enabled and the node supports them
|
|
@@ -83,10 +80,7 @@ const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled,
|
|
|
83
80
|
}
|
|
84
81
|
return [];
|
|
85
82
|
};
|
|
86
|
-
const editButton = (formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI
|
|
87
|
-
// Ignored via go/ees005
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
89
|
-
) => {
|
|
83
|
+
const editButton = (formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) => {
|
|
90
84
|
if (!extensionState.showEditButton) {
|
|
91
85
|
return [];
|
|
92
86
|
}
|
|
@@ -124,10 +124,7 @@ class ConfigPanel extends React.Component {
|
|
|
124
124
|
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
125
125
|
// workaround for DST-2697, remove this function once fix.
|
|
126
126
|
_defineProperty(this, "backfillTabFormData", (fields, formData, currentParameters) => {
|
|
127
|
-
const getRelevantData = (field, formParams, currentParams, backfill
|
|
128
|
-
// Ignored via go/ees005
|
|
129
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
130
|
-
) => {
|
|
127
|
+
const getRelevantData = (field, formParams, currentParams, backfill) => {
|
|
131
128
|
if (field.hasGroupedValues && !(field.name in backfill)) {
|
|
132
129
|
backfill[field.name] = {};
|
|
133
130
|
}
|
|
@@ -10,7 +10,7 @@ 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
12
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
13
|
-
import CrossIcon from '@atlaskit/icon/
|
|
13
|
+
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
14
14
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
15
15
|
import { N200 } from '@atlaskit/theme/colors';
|
|
16
16
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -43,10 +43,7 @@ const findDuplicateFieldsInternal = fields => {
|
|
|
43
43
|
return;
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
|
-
export const serialize = async (manifest, data, fields, options = {}
|
|
47
|
-
// Ignored via go/ees005
|
|
48
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
49
|
-
) => {
|
|
46
|
+
export const serialize = async (manifest, data, fields, options = {}) => {
|
|
50
47
|
const result = [];
|
|
51
48
|
const {
|
|
52
49
|
depth = 0,
|
|
@@ -301,10 +298,7 @@ const flattenFields = fields => {
|
|
|
301
298
|
};
|
|
302
299
|
return fields.reduce(flattenAccumulator, []);
|
|
303
300
|
};
|
|
304
|
-
export const deserialize = async (manifest, data, fields, depth = 0
|
|
305
|
-
// Ignored via go/ees005
|
|
306
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
307
|
-
) => {
|
|
301
|
+
export const deserialize = async (manifest, data, fields, depth = 0) => {
|
|
308
302
|
const dataArray = convertToParametersArray(data);
|
|
309
303
|
let result = [];
|
|
310
304
|
const errors = [];
|
|
@@ -104,8 +104,6 @@ export const getContextPanel = getEditorView => (api, featureFlags) => state =>
|
|
|
104
104
|
|
|
105
105
|
// Added this interface to handle the macroParams on Parameters
|
|
106
106
|
|
|
107
|
-
// Ignored via go/ees005
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
109
107
|
export async function onChangeAction(editorView, updatedParameters = {}, oldParameters = {}, nodeWithPos, onSaving) {
|
|
110
108
|
// WARNING: editorView.state stales quickly, do not unpack
|
|
111
109
|
const {
|
|
@@ -9,10 +9,7 @@ import { findSelectedNodeOfType, replaceParentNodeOfType, replaceSelectedNode }
|
|
|
9
9
|
import { createExtensionAPI, getEditInLegacyMacroBrowser } from '../pm-plugins/extension-api';
|
|
10
10
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
11
11
|
import { findExtensionWithLocalId } from '../pm-plugins/utils';
|
|
12
|
-
export var buildExtensionNode = function buildExtensionNode(type, schema, attrs, content, marks
|
|
13
|
-
// Ignored via go/ees005
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
15
|
-
) {
|
|
12
|
+
export var buildExtensionNode = function buildExtensionNode(type, schema, attrs, content, marks) {
|
|
16
13
|
switch (type) {
|
|
17
14
|
case 'extension':
|
|
18
15
|
return schema.nodes.extension.createChecked(attrs, content, marks);
|
|
@@ -25,10 +22,7 @@ export var buildExtensionNode = function buildExtensionNode(type, schema, attrs,
|
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
24
|
export var performNodeUpdate = function performNodeUpdate(editorAnalyticsAPI) {
|
|
28
|
-
return function (type, newAttrs, content, marks, shouldScrollIntoView
|
|
29
|
-
// Ignored via go/ees005
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
31
|
-
) {
|
|
25
|
+
return function (type, newAttrs, content, marks, shouldScrollIntoView) {
|
|
32
26
|
return function (_state, _dispatch, view) {
|
|
33
27
|
if (!view) {
|
|
34
28
|
throw Error('EditorView is required to perform node update!');
|
|
@@ -171,10 +165,7 @@ var updateExtensionParams = function updateExtensionParams(editorAnalyticsAPI) {
|
|
|
171
165
|
}();
|
|
172
166
|
};
|
|
173
167
|
};
|
|
174
|
-
export var editExtension = function editExtension(macroProvider, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension
|
|
175
|
-
// Ignored via go/ees005
|
|
176
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
177
|
-
) {
|
|
168
|
+
export var editExtension = function editExtension(macroProvider, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension) {
|
|
178
169
|
return function (state, dispatch, view) {
|
|
179
170
|
if (!view) {
|
|
180
171
|
return false;
|
|
@@ -166,10 +166,7 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
|
|
|
166
166
|
var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
|
|
167
167
|
var featureFlags = arguments.length > 8 ? arguments[8] : undefined;
|
|
168
168
|
var allowDragAndDrop = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : true;
|
|
169
|
-
var __rendererExtensionOptions
|
|
170
|
-
// Ignored via go/ees005
|
|
171
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
172
|
-
= arguments.length > 10 ? arguments[10] : undefined;
|
|
169
|
+
var __rendererExtensionOptions = arguments.length > 10 ? arguments[10] : undefined;
|
|
173
170
|
var state = createPluginState(dispatch, {
|
|
174
171
|
showEditButton: false,
|
|
175
172
|
showContextPanel: false
|
|
@@ -313,8 +310,6 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
|
|
|
313
310
|
{
|
|
314
311
|
useLongPressSelection: useLongPressSelection
|
|
315
312
|
}),
|
|
316
|
-
// Ignored via go/ees005
|
|
317
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
318
313
|
handleDrop: function handleDrop(view, event, slice, moved) {
|
|
319
314
|
if (fg('platform_editor_legacy_content_macro')) {
|
|
320
315
|
if (!allowDragAndDrop) {
|
|
@@ -40,10 +40,7 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
40
40
|
// and not inside a layoutSection
|
|
41
41
|
return !!((isMultiBodiedExtension || isNonEmbeddedBodiedExtension || isNonEmbeddedExtension) && !hasParentNodeOfType([layoutSection])(selection));
|
|
42
42
|
};
|
|
43
|
-
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI
|
|
44
|
-
// Ignored via go/ees005
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
46
|
-
) {
|
|
43
|
+
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI) {
|
|
47
44
|
var nodeWithPos = getSelectedExtension(state, true);
|
|
48
45
|
|
|
49
46
|
// we should only return breakout options when breakouts are enabled and the node supports them
|
|
@@ -77,10 +74,7 @@ var breakoutOptions = function breakoutOptions(state, formatMessage, extensionSt
|
|
|
77
74
|
}
|
|
78
75
|
return [];
|
|
79
76
|
};
|
|
80
|
-
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI
|
|
81
|
-
// Ignored via go/ees005
|
|
82
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
83
|
-
) {
|
|
77
|
+
var editButton = function editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI) {
|
|
84
78
|
if (!extensionState.showEditButton) {
|
|
85
79
|
return [];
|
|
86
80
|
}
|
|
@@ -135,10 +135,7 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
135
135
|
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
136
136
|
// workaround for DST-2697, remove this function once fix.
|
|
137
137
|
_defineProperty(_this, "backfillTabFormData", function (fields, formData, currentParameters) {
|
|
138
|
-
var getRelevantData = function getRelevantData(field, formParams, currentParams, backfill
|
|
139
|
-
// Ignored via go/ees005
|
|
140
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
141
|
-
) {
|
|
138
|
+
var getRelevantData = function getRelevantData(field, formParams, currentParams, backfill) {
|
|
142
139
|
if (field.hasGroupedValues && !(field.name in backfill)) {
|
|
143
140
|
backfill[field.name] = {};
|
|
144
141
|
}
|
|
@@ -10,7 +10,7 @@ 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
12
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
13
|
-
import CrossIcon from '@atlaskit/icon/
|
|
13
|
+
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
14
14
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
15
15
|
import { N200 } from '@atlaskit/theme/colors';
|
|
16
16
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -145,8 +145,6 @@ export var getContextPanel = function getContextPanel(getEditorView) {
|
|
|
145
145
|
|
|
146
146
|
// Added this interface to handle the macroParams on Parameters
|
|
147
147
|
|
|
148
|
-
// Ignored via go/ees005
|
|
149
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
150
148
|
export function onChangeAction(_x2) {
|
|
151
149
|
return _onChangeAction.apply(this, arguments);
|
|
152
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@atlaskit/section-message": "^6.8.0",
|
|
52
52
|
"@atlaskit/select": "^18.9.0",
|
|
53
53
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
54
|
-
"@atlaskit/spinner": "^
|
|
54
|
+
"@atlaskit/spinner": "^17.0.0",
|
|
55
55
|
"@atlaskit/tabs": "^17.1.0",
|
|
56
56
|
"@atlaskit/textarea": "^5.7.0",
|
|
57
57
|
"@atlaskit/textfield": "^6.7.0",
|
|
58
58
|
"@atlaskit/theme": "^14.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^2.41.0",
|
|
60
60
|
"@atlaskit/toggle": "^14.0.0",
|
|
61
61
|
"@atlaskit/tokens": "^3.2.0",
|
|
62
62
|
"@atlaskit/tooltip": "^19.0.0",
|