@atlaskit/editor-core 189.3.15 → 189.3.16
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 +7 -0
- package/dist/cjs/plugins/extension/extension-api.js +3 -3
- package/dist/cjs/plugins/extension/index.js +14 -3
- package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/actions.js +3 -4
- package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/index.js +2 -18
- package/dist/cjs/plugins/extension/toolbar.js +1 -1
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/insert-block/index.js +36 -53
- package/dist/cjs/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +3 -9
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +3 -3
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -5
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +7 -8
- package/dist/cjs/plugins/paste/handlers.js +3 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/cjs/presets/universal.js +0 -5
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/extension/extension-api.js +2 -2
- package/dist/es2019/plugins/extension/index.js +13 -3
- package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/actions.js +2 -2
- package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/index.js +1 -14
- package/dist/es2019/plugins/extension/toolbar.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/insert-block/index.js +19 -36
- package/dist/es2019/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +4 -8
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -3
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +2 -2
- package/dist/es2019/plugins/paste/handlers.js +4 -3
- package/dist/es2019/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/es2019/presets/universal.js +1 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/extension/extension-api.js +2 -2
- package/dist/esm/plugins/extension/index.js +14 -3
- package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/actions.js +2 -2
- package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/index.js +1 -17
- package/dist/esm/plugins/extension/toolbar.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/insert-block/index.js +36 -53
- package/dist/esm/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +4 -10
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -2
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -3
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +2 -2
- package/dist/esm/plugins/paste/handlers.js +4 -3
- package/dist/esm/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/esm/presets/universal.js +1 -6
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/extension/extension-api.d.ts +1 -1
- package/dist/types/plugins/{macro → extension/pm-plugins/macro}/index.d.ts +1 -4
- package/dist/types/plugins/extension/pm-plugins/macro/types.d.ts +4 -0
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/{types-ts4.5 → types/plugins/insert-block}/ui/ElementBrowser/types.d.ts +2 -2
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -2
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -1
- package/dist/types/plugins/paste/handlers.d.ts +2 -1
- package/dist/types/presets/default.d.ts +8 -0
- package/dist/types-ts4.5/plugins/extension/extension-api.d.ts +1 -1
- package/dist/types-ts4.5/plugins/{macro → extension/pm-plugins/macro}/index.d.ts +1 -4
- package/dist/types-ts4.5/plugins/extension/pm-plugins/macro/types.d.ts +4 -0
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/{types → types-ts4.5/plugins/insert-block}/ui/ElementBrowser/types.d.ts +2 -2
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -2
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -1
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +2 -1
- package/dist/types-ts4.5/presets/default.d.ts +8 -0
- package/package.json +3 -3
- package/dist/types/plugins/macro/types.d.ts +0 -4
- package/dist/types-ts4.5/plugins/macro/types.d.ts +0 -4
- /package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
- /package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/types.js +0 -0
- /package/dist/cjs/{ui → plugins/insert-block/ui}/ElementBrowser/types.js +0 -0
- /package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
- /package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/types.js +0 -0
- /package/dist/es2019/{ui → plugins/insert-block/ui}/ElementBrowser/types.js +0 -0
- /package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
- /package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/types.js +0 -0
- /package/dist/esm/{ui → plugins/insert-block/ui}/ElementBrowser/types.js +0 -0
- /package/dist/types/plugins/{macro → extension/pm-plugins/macro}/actions.d.ts +0 -0
- /package/dist/types/plugins/{macro → extension/pm-plugins/macro}/plugin-key.d.ts +0 -0
- /package/dist/types/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.d.ts +0 -0
- /package/dist/types-ts4.5/plugins/{macro → extension/pm-plugins/macro}/actions.d.ts +0 -0
- /package/dist/types-ts4.5/plugins/{macro → extension/pm-plugins/macro}/plugin-key.d.ts +0 -0
- /package/dist/types-ts4.5/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.d.ts +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { extension, bodiedExtension, inlineExtension } from '@atlaskit/adf-schema';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { createPlugin } from './pm-plugins/main';
|
|
4
|
+
import { createPlugin as createMacroPlugin } from './pm-plugins/macro';
|
|
5
|
+
import { insertMacroFromMacroBrowser, runMacroAutoConvert } from './pm-plugins/macro/actions';
|
|
4
6
|
import keymapPlugin from './pm-plugins/keymap';
|
|
5
7
|
import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
6
8
|
import { getToolbarConfig } from './toolbar';
|
|
@@ -10,7 +12,7 @@ const extensionPlugin = ({
|
|
|
10
12
|
config: options = {},
|
|
11
13
|
api
|
|
12
14
|
}) => {
|
|
13
|
-
var _api$featureFlags, _api$contextPanel3, _api$
|
|
15
|
+
var _api$featureFlags, _api$analytics2, _api$contextPanel3, _api$analytics3, _api$contextPanel4;
|
|
14
16
|
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
15
17
|
//Note: This is a hack to get the editor view reference in the plugin. Copied from table plugin.
|
|
16
18
|
//This is needed to get the current selection in the editor
|
|
@@ -68,6 +70,12 @@ const extensionPlugin = ({
|
|
|
68
70
|
}
|
|
69
71
|
});
|
|
70
72
|
}
|
|
73
|
+
}, {
|
|
74
|
+
name: 'macro',
|
|
75
|
+
plugin: ({
|
|
76
|
+
dispatch,
|
|
77
|
+
providerFactory
|
|
78
|
+
}) => createMacroPlugin(dispatch, providerFactory)
|
|
71
79
|
}];
|
|
72
80
|
},
|
|
73
81
|
actions: {
|
|
@@ -78,14 +86,16 @@ const extensionPlugin = ({
|
|
|
78
86
|
applyChange: api === null || api === void 0 ? void 0 : (_api$contextPanel2 = api.contextPanel) === null || _api$contextPanel2 === void 0 ? void 0 : _api$contextPanel2.actions.applyChange,
|
|
79
87
|
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
80
88
|
});
|
|
81
|
-
}
|
|
89
|
+
},
|
|
90
|
+
insertMacroFromMacroBrowser: insertMacroFromMacroBrowser(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions),
|
|
91
|
+
runMacroAutoConvert
|
|
82
92
|
},
|
|
83
93
|
pluginsOptions: {
|
|
84
94
|
floatingToolbar: getToolbarConfig({
|
|
85
95
|
breakoutEnabled: options.breakoutEnabled,
|
|
86
96
|
hoverDecoration: api === null || api === void 0 ? void 0 : api.decorations.actions.hoverDecoration,
|
|
87
97
|
applyChangeToContextPanel: api === null || api === void 0 ? void 0 : (_api$contextPanel3 = api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
88
|
-
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$
|
|
98
|
+
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions
|
|
89
99
|
}),
|
|
90
100
|
contextPanel: getContextPanel(options.allowAutoSave, featureFlags, api === null || api === void 0 ? void 0 : (_api$contextPanel4 = api.contextPanel) === null || _api$contextPanel4 === void 0 ? void 0 : _api$contextPanel4.actions.applyChange)
|
|
91
101
|
}
|
|
@@ -3,9 +3,9 @@ import { Selection, NodeSelection, TextSelection } from '@atlaskit/editor-prosem
|
|
|
3
3
|
import { safeInsert, replaceSelectedNode, findSelectedNodeOfType, replaceParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { getValidNode } from '@atlaskit/editor-common/validator';
|
|
5
5
|
import { normaliseNestedLayout } from '@atlaskit/editor-common/insert';
|
|
6
|
-
import { getPluginState as getExtensionPluginState } from '
|
|
6
|
+
import { getPluginState as getExtensionPluginState } from '../../plugin-factory';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import { TARGET_SELECTION_SOURCE } from '
|
|
8
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { pluginKey } from './plugin-key';
|
|
10
10
|
export const insertMacroFromMacroBrowser = editorAnalyticsAPI => (macroProvider, macroNode, isEditing) => async view => {
|
|
11
11
|
if (!macroProvider) {
|
|
@@ -33,17 +33,4 @@ export const createPlugin = (dispatch, providerFactory) => new SafePlugin({
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
});
|
|
37
|
-
const macroPlugin = () => ({
|
|
38
|
-
name: 'macro',
|
|
39
|
-
pmPlugins() {
|
|
40
|
-
return [{
|
|
41
|
-
name: 'macro',
|
|
42
|
-
plugin: ({
|
|
43
|
-
dispatch,
|
|
44
|
-
providerFactory
|
|
45
|
-
}) => createPlugin(dispatch, providerFactory)
|
|
46
|
-
}];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
export default macroPlugin;
|
|
36
|
+
});
|
|
@@ -10,7 +10,7 @@ import { editExtension } from './actions';
|
|
|
10
10
|
import { getPluginState } from './pm-plugins/main';
|
|
11
11
|
import { getSelectedExtension } from './utils';
|
|
12
12
|
import { updateExtensionLayout, removeExtension, removeDescendantNodes } from './commands';
|
|
13
|
-
import { pluginKey as macroPluginKey } from '
|
|
13
|
+
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
14
14
|
import { isReferencedSource, getChildrenInfo, getNodeName } from '@atlaskit/editor-common/utils';
|
|
15
15
|
export const messages = defineMessages({
|
|
16
16
|
edit: {
|
|
@@ -4,7 +4,6 @@ export { default as extensionPlugin } from './extension';
|
|
|
4
4
|
export { default as insertBlockPlugin } from './insert-block';
|
|
5
5
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
6
6
|
export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
|
|
7
|
-
export { default as macroPlugin } from './macro';
|
|
8
7
|
export { default as pastePlugin } from './paste';
|
|
9
8
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
10
9
|
export { default as breakoutPlugin } from './breakout';
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import { insertMacroFromMacroBrowser } from '../macro';
|
|
4
|
-
import WithPluginState from '../../ui/WithPluginState';
|
|
5
3
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
6
4
|
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
|
|
7
5
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import {
|
|
9
|
-
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
6
|
+
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
10
7
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
8
|
const toolbarSizeToButtons = toolbarSize => {
|
|
12
9
|
switch (toolbarSize) {
|
|
@@ -61,34 +58,22 @@ const insertBlockPlugin = ({
|
|
|
61
58
|
isLastItem
|
|
62
59
|
}) {
|
|
63
60
|
const renderNode = providers => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
81
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
82
|
-
toolbarSize: toolbarSize,
|
|
83
|
-
disabled: disabled,
|
|
84
|
-
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
85
|
-
isLastItem: isLastItem,
|
|
86
|
-
featureFlags: featureFlags,
|
|
87
|
-
macroState: macroState,
|
|
88
|
-
providers: providers,
|
|
89
|
-
options: options
|
|
90
|
-
});
|
|
91
|
-
}
|
|
61
|
+
return /*#__PURE__*/React.createElement(ToolbarInsertBlockWithInjectionApi, {
|
|
62
|
+
pluginInjectionApi: api,
|
|
63
|
+
editorView: editorView,
|
|
64
|
+
editorActions: editorActions,
|
|
65
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
66
|
+
providerFactory: providerFactory,
|
|
67
|
+
popupsMountPoint: popupsMountPoint,
|
|
68
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
69
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
70
|
+
toolbarSize: toolbarSize,
|
|
71
|
+
disabled: disabled,
|
|
72
|
+
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
73
|
+
isLastItem: isLastItem,
|
|
74
|
+
featureFlags: featureFlags,
|
|
75
|
+
providers: providers,
|
|
76
|
+
options: options
|
|
92
77
|
});
|
|
93
78
|
};
|
|
94
79
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
@@ -113,10 +98,9 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
113
98
|
providers,
|
|
114
99
|
pluginInjectionApi,
|
|
115
100
|
options,
|
|
116
|
-
macroState,
|
|
117
101
|
featureFlags
|
|
118
102
|
}) {
|
|
119
|
-
var _ref, _ref2, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b, _pluginInjectionApi$
|
|
103
|
+
var _ref, _ref2, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b, _pluginInjectionApi$e;
|
|
120
104
|
const buttons = toolbarSizeToButtons(toolbarSize);
|
|
121
105
|
const {
|
|
122
106
|
dateState,
|
|
@@ -159,8 +143,7 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
159
143
|
nativeStatusSupported: options.nativeStatusSupported,
|
|
160
144
|
horizontalRuleEnabled: options.horizontalRuleEnabled,
|
|
161
145
|
onInsertBlockType: handleInsertBlockType(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.codeBlock) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.insertCodeBlock, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$p = pluginInjectionApi.panel) === null || _pluginInjectionApi$p === void 0 ? void 0 : _pluginInjectionApi$p.actions.insertPanel, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$b = pluginInjectionApi.blockType) === null || _pluginInjectionApi$b === void 0 ? void 0 : _pluginInjectionApi$b.actions.insertBlockQuote),
|
|
162
|
-
onInsertMacroFromMacroBrowser:
|
|
163
|
-
macroProvider: macroState.macroProvider,
|
|
146
|
+
onInsertMacroFromMacroBrowser: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$e = pluginInjectionApi.extension) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.actions.insertMacroFromMacroBrowser,
|
|
164
147
|
popupsMountPoint: popupsMountPoint,
|
|
165
148
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
166
149
|
popupsScrollableElement: popupsScrollableElement,
|
|
@@ -6,8 +6,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
6
6
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
7
7
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme';
|
|
9
|
-
import {
|
|
10
|
-
import { DN50, N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
9
|
+
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
11
10
|
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '@atlaskit/editor-common/quick-insert';
|
|
12
11
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
13
12
|
import { ElementBrowser, ELEMENT_ITEM_HEIGHT } from '@atlaskit/editor-common/element-browser';
|
|
@@ -73,7 +72,7 @@ const InsertMenu = ({
|
|
|
73
72
|
}, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q6 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q6 === void 0 ? void 0 : _pluginInjectionApi$q6.actions, quickInsertDropdownItems]);
|
|
74
73
|
const emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q7 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q7 === void 0 ? void 0 : (_pluginInjectionApi$q8 = _pluginInjectionApi$q7.sharedState.currentState()) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : _pluginInjectionApi$q8.emptyStateHandler;
|
|
75
74
|
return jsx("div", {
|
|
76
|
-
css:
|
|
75
|
+
css: insertMenuWrapper(itemCount)
|
|
77
76
|
}, jsx(ElementBrowserWrapper, {
|
|
78
77
|
handleClickOutside: toggleVisiblity,
|
|
79
78
|
handleEscapeKeydown: toggleVisiblity,
|
|
@@ -119,17 +118,14 @@ const getInsertMenuHeight = ({
|
|
|
119
118
|
return 560; // For showing 6 Elements.
|
|
120
119
|
};
|
|
121
120
|
|
|
122
|
-
const insertMenuWrapper =
|
|
121
|
+
const insertMenuWrapper = itemCount => css`
|
|
123
122
|
display: flex;
|
|
124
123
|
flex-direction: column;
|
|
125
124
|
width: 320px;
|
|
126
125
|
height: ${getInsertMenuHeight({
|
|
127
126
|
itemCount
|
|
128
127
|
})}px;
|
|
129
|
-
background-color: ${
|
|
130
|
-
light: `var(--ds-surface-overlay, ${N0})`,
|
|
131
|
-
dark: `var(--ds-surface-overlay, ${DN50})`
|
|
132
|
-
})(theme)};
|
|
128
|
+
background-color: ${`var(--ds-surface-overlay, ${N0})`};
|
|
133
129
|
border-radius: ${borderRadius()}px;
|
|
134
130
|
box-shadow: ${`var(--ds-shadow-overlay, ${`0 0 0 1px ${N30A},
|
|
135
131
|
0 2px 1px ${N30A},
|
package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
3
|
-
import InsertMenu from '
|
|
3
|
+
import InsertMenu from '../ElementBrowser/InsertMenu';
|
|
4
4
|
import { DropDownButton } from './dropdown-button';
|
|
5
5
|
export const BlockInsertElementBrowser = props => {
|
|
6
6
|
return /*#__PURE__*/React.createElement(React.Fragment, null, props.open && /*#__PURE__*/React.createElement(Popup, {
|
|
@@ -3,7 +3,7 @@ import memoize from 'lodash/memoize';
|
|
|
3
3
|
import memoizeOne from 'memoize-one';
|
|
4
4
|
import { messages } from './messages';
|
|
5
5
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { ToolTipContent } from '
|
|
6
|
+
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
7
|
import { sortItems } from './sort-items';
|
|
8
8
|
import { action, link, media, mention, emoji, table, layout, codeblock, panel, blockquote, decision, horizontalrule, expand, date, placeholder, status, more, imageUpload } from './item';
|
|
9
9
|
import { shallowEquals } from './shallow-equals';
|
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import AddIcon from '@atlaskit/icon/glyph/editor/add';
|
|
5
5
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
6
|
-
import { ToolTipContent } from '
|
|
7
|
-
import ToolbarButton from '
|
|
6
|
+
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
|
+
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
8
8
|
import { expandIconWrapperStyle } from '@atlaskit/editor-common/styles';
|
|
9
9
|
import { triggerWrapper } from './styles';
|
|
10
10
|
const DropDownButtonIcon = /*#__PURE__*/React.memo(props => jsx("span", {
|
|
@@ -6,7 +6,7 @@ import ReactDOM from 'react-dom';
|
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import { EmojiPicker as AkEmojiPicker } from '@atlaskit/emoji/picker';
|
|
8
8
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
9
|
-
import ToolbarButton from '
|
|
9
|
+
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
10
|
import { separatorStyles, buttonGroupStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
11
11
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
import { insertTaskDecisionCommand } from '../../../tasks-and-decisions/commands';
|
|
@@ -14,7 +14,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
14
14
|
import { messages } from './messages';
|
|
15
15
|
import { createItems } from './create-items';
|
|
16
16
|
import { BlockInsertMenu } from './block-insert-menu';
|
|
17
|
-
import withOuterListeners from '
|
|
17
|
+
import { withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Checks if an element is detached (i.e. not in the current document)
|
|
@@ -423,7 +423,6 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
423
423
|
horizontalRuleEnabled: props.horizontalRuleEnabled,
|
|
424
424
|
layoutSectionEnabled: props.layoutSectionEnabled,
|
|
425
425
|
expandEnabled: props.expandEnabled,
|
|
426
|
-
macroProvider: props.macroProvider,
|
|
427
426
|
showElementBrowserLink: props.showElementBrowserLink,
|
|
428
427
|
emojiProvider: props.emojiProvider,
|
|
429
428
|
availableWrapperBlockTypes: props.availableWrapperBlockTypes,
|
|
@@ -19,8 +19,8 @@ import HorizontalRuleIcon from '@atlaskit/icon/glyph/editor/horizontal-rule';
|
|
|
19
19
|
import CodeIcon from '@atlaskit/icon/glyph/editor/code';
|
|
20
20
|
import InfoIcon from '@atlaskit/icon/glyph/editor/info';
|
|
21
21
|
import QuoteIcon from '@atlaskit/icon/glyph/quote';
|
|
22
|
-
import { shortcutStyle } from '
|
|
23
|
-
import { tooltip, addLink, toggleTable } from '
|
|
22
|
+
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
23
|
+
import { tooltip, addLink, toggleTable } from '@atlaskit/editor-common/keymaps';
|
|
24
24
|
import { shallowEquals } from './shallow-equals';
|
|
25
25
|
import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
26
26
|
const from = init => ({
|
|
@@ -9,7 +9,7 @@ import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
|
9
9
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
|
|
11
11
|
// TODO: ED-20519 Needs Macro extraction
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
import { addReplaceSelectedTableAnalytics, applyTextMarksToSlice, hasOnlyNodesOfType } from './util';
|
|
14
14
|
import { insertSliceForLists } from './edge-cases';
|
|
15
15
|
import { startTrackingPastedMacroPositions, stopTrackingPastedMacroPositions } from './commands';
|
|
@@ -483,7 +483,7 @@ function insertAutoMacro(slice, macro, view, from, to) {
|
|
|
483
483
|
}
|
|
484
484
|
return false;
|
|
485
485
|
}
|
|
486
|
-
export function handleMacroAutoConvert(text, slice, queueCardsFromChangedTr, cardsOptions, extensionAutoConverter) {
|
|
486
|
+
export function handleMacroAutoConvert(text, slice, queueCardsFromChangedTr, runMacroAutoConvert, cardsOptions, extensionAutoConverter) {
|
|
487
487
|
return (state, dispatch, view) => {
|
|
488
488
|
let macro = null;
|
|
489
489
|
|
|
@@ -497,7 +497,8 @@ export function handleMacroAutoConvert(text, slice, queueCardsFromChangedTr, car
|
|
|
497
497
|
|
|
498
498
|
// then try from macro provider (which will be removed some time in the future)
|
|
499
499
|
if (!macro) {
|
|
500
|
-
|
|
500
|
+
var _runMacroAutoConvert;
|
|
501
|
+
macro = (_runMacroAutoConvert = runMacroAutoConvert === null || runMacroAutoConvert === void 0 ? void 0 : runMacroAutoConvert(state, text)) !== null && _runMacroAutoConvert !== void 0 ? _runMacroAutoConvert : null;
|
|
501
502
|
}
|
|
502
503
|
if (macro) {
|
|
503
504
|
/**
|
|
@@ -221,14 +221,14 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
221
221
|
// force a "paste as plain text" action by clearing the markdownSlice.
|
|
222
222
|
markdownSlice = !((_markdownSlice = markdownSlice) !== null && _markdownSlice !== void 0 && _markdownSlice.size) ? undefined : markdownSlice;
|
|
223
223
|
if (markdownSlice) {
|
|
224
|
-
var _pluginInjectionApi$c, _pluginInjectionApi$c2;
|
|
224
|
+
var _pluginInjectionApi$c, _pluginInjectionApi$c2, _pluginInjectionApi$e, _pluginInjectionApi$e2;
|
|
225
225
|
// linkify text prior to converting to macro
|
|
226
226
|
if (handlePasteLinkOnSelectedTextWithAnalytics(editorAnalyticsAPI)(view, event, markdownSlice, PasteTypes.markdown)(state, dispatch)) {
|
|
227
227
|
return true;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// run macro autoconvert prior to other conversions
|
|
231
|
-
if (handleMacroAutoConvert(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.card) === null || _pluginInjectionApi$c === void 0 ? void 0 : (_pluginInjectionApi$c2 = _pluginInjectionApi$c.actions) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
231
|
+
if (handleMacroAutoConvert(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.card) === null || _pluginInjectionApi$c === void 0 ? void 0 : (_pluginInjectionApi$c2 = _pluginInjectionApi$c.actions) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.queueCardsFromChangedTr, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$e = pluginInjectionApi.extension) === null || _pluginInjectionApi$e === void 0 ? void 0 : (_pluginInjectionApi$e2 = _pluginInjectionApi$e.actions) === null || _pluginInjectionApi$e2 === void 0 ? void 0 : _pluginInjectionApi$e2.runMacroAutoConvert, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
232
232
|
// TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
|
|
233
233
|
sendPasteAnalyticsEvent(editorAnalyticsAPI)(view, event, markdownSlice, {
|
|
234
234
|
type: PasteTypes.markdown
|
|
@@ -295,7 +295,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
295
295
|
|
|
296
296
|
// finally, handle rich-text copy-paste
|
|
297
297
|
if (isRichText) {
|
|
298
|
-
var _pluginInjectionApi$c3, _pluginInjectionApi$c4, _pluginInjectionApi$l;
|
|
298
|
+
var _pluginInjectionApi$c3, _pluginInjectionApi$c4, _pluginInjectionApi$e3, _pluginInjectionApi$e4, _pluginInjectionApi$l;
|
|
299
299
|
// linkify the text where possible
|
|
300
300
|
slice = linkifyContent(state.schema)(slice);
|
|
301
301
|
if (handlePasteLinkOnSelectedTextWithAnalytics(editorAnalyticsAPI)(view, event, slice, PasteTypes.richText)(state, dispatch)) {
|
|
@@ -303,7 +303,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
// run macro autoconvert prior to other conversions
|
|
306
|
-
if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c3 = pluginInjectionApi.card) === null || _pluginInjectionApi$c3 === void 0 ? void 0 : (_pluginInjectionApi$c4 = _pluginInjectionApi$c3.actions) === null || _pluginInjectionApi$c4 === void 0 ? void 0 : _pluginInjectionApi$c4.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
306
|
+
if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c3 = pluginInjectionApi.card) === null || _pluginInjectionApi$c3 === void 0 ? void 0 : (_pluginInjectionApi$c4 = _pluginInjectionApi$c3.actions) === null || _pluginInjectionApi$c4 === void 0 ? void 0 : _pluginInjectionApi$c4.queueCardsFromChangedTr, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$e3 = pluginInjectionApi.extension) === null || _pluginInjectionApi$e3 === void 0 ? void 0 : (_pluginInjectionApi$e4 = _pluginInjectionApi$e3.actions) === null || _pluginInjectionApi$e4 === void 0 ? void 0 : _pluginInjectionApi$e4.runMacroAutoConvert, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
|
|
307
307
|
// TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
|
|
308
308
|
sendPasteAnalyticsEvent(editorAnalyticsAPI)(view, event, slice, {
|
|
309
309
|
type: PasteTypes.richText
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin,
|
|
1
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
2
2
|
import { panelPlugin } from '@atlaskit/editor-plugin-panel';
|
|
3
3
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
4
4
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
@@ -266,11 +266,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
266
266
|
}]);
|
|
267
267
|
}
|
|
268
268
|
return builder;
|
|
269
|
-
}).maybeAdd(macroPlugin, (plugin, builder) => {
|
|
270
|
-
if (props.macroProvider) {
|
|
271
|
-
return builder.add(plugin);
|
|
272
|
-
}
|
|
273
|
-
return builder;
|
|
274
269
|
}).maybeAdd(annotationPlugin, (plugin, builder) => {
|
|
275
270
|
// See default list for when adding annotations with a provider
|
|
276
271
|
if (!props.annotationProviders && props.allowConfluenceInlineComment) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "189.3.
|
|
2
|
+
export const version = "189.3.16";
|
|
@@ -3,8 +3,8 @@ import { validator } from '@atlaskit/adf-utils/validator';
|
|
|
3
3
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
4
4
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { insertMacroFromMacroBrowser } from '
|
|
7
|
-
import { pluginKey as macroPluginKey } from '
|
|
6
|
+
import { insertMacroFromMacroBrowser } from './pm-plugins/macro/actions';
|
|
7
|
+
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
8
8
|
import { nodeToJSON } from '../../utils';
|
|
9
9
|
import { setEditingContextToContextPanel } from './commands';
|
|
10
10
|
import { findNodePosWithLocalId, getDataConsumerMark, getNodeTypesReferenced, getSelectedExtension } from './utils';
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { extension, bodiedExtension, inlineExtension } from '@atlaskit/adf-schema';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { createPlugin } from './pm-plugins/main';
|
|
4
|
+
import { createPlugin as createMacroPlugin } from './pm-plugins/macro';
|
|
5
|
+
import { insertMacroFromMacroBrowser, runMacroAutoConvert } from './pm-plugins/macro/actions';
|
|
4
6
|
import keymapPlugin from './pm-plugins/keymap';
|
|
5
7
|
import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
6
8
|
import { getToolbarConfig } from './toolbar';
|
|
7
9
|
import { getContextPanel } from './context-panel';
|
|
8
10
|
import { createExtensionAPI } from './extension-api';
|
|
9
11
|
var extensionPlugin = function extensionPlugin(_ref) {
|
|
10
|
-
var _api$featureFlags, _api$contextPanel3, _api$
|
|
12
|
+
var _api$featureFlags, _api$analytics2, _api$contextPanel3, _api$analytics3, _api$contextPanel4;
|
|
11
13
|
var _ref$config = _ref.config,
|
|
12
14
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
13
15
|
_api = _ref.api;
|
|
@@ -69,6 +71,13 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
73
|
}
|
|
74
|
+
}, {
|
|
75
|
+
name: 'macro',
|
|
76
|
+
plugin: function plugin(_ref3) {
|
|
77
|
+
var dispatch = _ref3.dispatch,
|
|
78
|
+
providerFactory = _ref3.providerFactory;
|
|
79
|
+
return createMacroPlugin(dispatch, providerFactory);
|
|
80
|
+
}
|
|
72
81
|
}];
|
|
73
82
|
},
|
|
74
83
|
actions: {
|
|
@@ -79,14 +88,16 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
79
88
|
applyChange: _api === null || _api === void 0 || (_api$contextPanel2 = _api.contextPanel) === null || _api$contextPanel2 === void 0 ? void 0 : _api$contextPanel2.actions.applyChange,
|
|
80
89
|
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics = _api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
81
90
|
});
|
|
82
|
-
}
|
|
91
|
+
},
|
|
92
|
+
insertMacroFromMacroBrowser: insertMacroFromMacroBrowser(_api === null || _api === void 0 || (_api$analytics2 = _api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions),
|
|
93
|
+
runMacroAutoConvert: runMacroAutoConvert
|
|
83
94
|
},
|
|
84
95
|
pluginsOptions: {
|
|
85
96
|
floatingToolbar: getToolbarConfig({
|
|
86
97
|
breakoutEnabled: options.breakoutEnabled,
|
|
87
98
|
hoverDecoration: _api === null || _api === void 0 ? void 0 : _api.decorations.actions.hoverDecoration,
|
|
88
99
|
applyChangeToContextPanel: _api === null || _api === void 0 || (_api$contextPanel3 = _api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
89
|
-
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$
|
|
100
|
+
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics3 = _api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions
|
|
90
101
|
}),
|
|
91
102
|
contextPanel: getContextPanel(options.allowAutoSave, featureFlags, _api === null || _api === void 0 || (_api$contextPanel4 = _api.contextPanel) === null || _api$contextPanel4 === void 0 ? void 0 : _api$contextPanel4.actions.applyChange)
|
|
92
103
|
}
|
|
@@ -8,9 +8,9 @@ import { Selection, NodeSelection, TextSelection } from '@atlaskit/editor-prosem
|
|
|
8
8
|
import { safeInsert, replaceSelectedNode, findSelectedNodeOfType, replaceParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
9
|
import { getValidNode } from '@atlaskit/editor-common/validator';
|
|
10
10
|
import { normaliseNestedLayout } from '@atlaskit/editor-common/insert';
|
|
11
|
-
import { getPluginState as getExtensionPluginState } from '
|
|
11
|
+
import { getPluginState as getExtensionPluginState } from '../../plugin-factory';
|
|
12
12
|
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
13
|
-
import { TARGET_SELECTION_SOURCE } from '
|
|
13
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
import { pluginKey } from './plugin-key';
|
|
15
15
|
export var insertMacroFromMacroBrowser = function insertMacroFromMacroBrowser(editorAnalyticsAPI) {
|
|
16
16
|
return function (macroProvider, macroNode, isEditing) {
|
|
@@ -39,20 +39,4 @@ export var createPlugin = function createPlugin(dispatch, providerFactory) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
};
|
|
43
|
-
var macroPlugin = function macroPlugin() {
|
|
44
|
-
return {
|
|
45
|
-
name: 'macro',
|
|
46
|
-
pmPlugins: function pmPlugins() {
|
|
47
|
-
return [{
|
|
48
|
-
name: 'macro',
|
|
49
|
-
plugin: function plugin(_ref) {
|
|
50
|
-
var dispatch = _ref.dispatch,
|
|
51
|
-
providerFactory = _ref.providerFactory;
|
|
52
|
-
return createPlugin(dispatch, providerFactory);
|
|
53
|
-
}
|
|
54
|
-
}];
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export default macroPlugin;
|
|
42
|
+
};
|
|
@@ -11,7 +11,7 @@ import { editExtension } from './actions';
|
|
|
11
11
|
import { getPluginState } from './pm-plugins/main';
|
|
12
12
|
import { getSelectedExtension } from './utils';
|
|
13
13
|
import { updateExtensionLayout, removeExtension, removeDescendantNodes } from './commands';
|
|
14
|
-
import { pluginKey as macroPluginKey } from '
|
|
14
|
+
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
15
15
|
import { isReferencedSource, getChildrenInfo as _getChildrenInfo, getNodeName } from '@atlaskit/editor-common/utils';
|
|
16
16
|
export var messages = defineMessages({
|
|
17
17
|
edit: {
|
|
@@ -4,7 +4,6 @@ export { default as extensionPlugin } from './extension';
|
|
|
4
4
|
export { default as insertBlockPlugin } from './insert-block';
|
|
5
5
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
6
6
|
export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
|
|
7
|
-
export { default as macroPlugin } from './macro';
|
|
8
7
|
export { default as pastePlugin } from './paste';
|
|
9
8
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
10
9
|
export { default as breakoutPlugin } from './breakout';
|