@atlaskit/editor-core 167.0.3 → 169.1.0
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 +38 -0
- package/dist/cjs/create-editor/create-plugins-list.js +7 -0
- package/dist/cjs/plugins/analytics/types/toolbar-button.js +2 -0
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -2
- package/dist/cjs/plugins/breakout/index.js +7 -0
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +3 -1
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +6 -1
- package/dist/cjs/plugins/card/styles.js +4 -2
- package/dist/cjs/plugins/card/toolbar.js +6 -1
- package/dist/cjs/plugins/code-block/styles.js +17 -41
- package/dist/cjs/plugins/code-block/ui/class-names.js +5 -2
- package/dist/cjs/plugins/collab-edit/index.js +2 -2
- package/dist/cjs/plugins/collab-edit/provider/channel.js +2 -2
- package/dist/cjs/plugins/copy-button/commands.js +85 -0
- package/dist/cjs/plugins/copy-button/index.js +27 -0
- package/dist/cjs/plugins/copy-button/pm-plugins/main.js +38 -0
- package/dist/cjs/plugins/copy-button/pm-plugins/plugin-key.js +11 -0
- package/dist/cjs/plugins/copy-button/utils.js +51 -0
- package/dist/cjs/plugins/extension/context-panel.js +2 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/cjs/plugins/indentation/messages.js +23 -0
- package/dist/cjs/plugins/index.js +16 -0
- package/dist/cjs/plugins/list/index.js +0 -43
- package/dist/cjs/plugins/macro/actions.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
- package/dist/cjs/plugins/panel/toolbar.js +10 -2
- package/dist/cjs/plugins/table/commands/hover.js +2 -2
- package/dist/cjs/plugins/table/toolbar.js +5 -1
- package/dist/cjs/plugins/table/utils/decoration.js +5 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +65 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/types.js +5 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +122 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +173 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +58 -0
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +48 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -5
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +17 -51
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/transformers.js +2 -2
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +12 -39
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +31 -87
- package/dist/cjs/utils/clipboard.js +67 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +8 -1
- package/dist/es2019/plugins/analytics/types/toolbar-button.js +2 -0
- package/dist/es2019/plugins/breakout/index.js +7 -0
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +3 -1
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +6 -1
- package/dist/es2019/plugins/card/styles.js +5 -0
- package/dist/es2019/plugins/card/toolbar.js +5 -1
- package/dist/es2019/plugins/code-block/styles.js +18 -95
- package/dist/es2019/plugins/code-block/ui/class-names.js +3 -2
- package/dist/es2019/plugins/copy-button/commands.js +64 -0
- package/dist/es2019/plugins/copy-button/index.js +15 -0
- package/dist/es2019/plugins/copy-button/pm-plugins/main.js +28 -0
- package/dist/es2019/plugins/copy-button/pm-plugins/plugin-key.js +2 -0
- package/dist/es2019/plugins/copy-button/utils.js +29 -0
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/es2019/plugins/indentation/messages.js +14 -0
- package/dist/es2019/plugins/index.js +3 -1
- package/dist/es2019/plugins/list/index.js +1 -44
- package/dist/es2019/plugins/panel/toolbar.js +9 -2
- package/dist/es2019/plugins/table/commands/hover.js +2 -2
- package/dist/es2019/plugins/table/toolbar.js +5 -2
- package/dist/es2019/plugins/table/utils/decoration.js +5 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +53 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/types.js +1 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +94 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +149 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +49 -0
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +35 -0
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +11 -10
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +17 -48
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +10 -30
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +34 -93
- package/dist/es2019/utils/clipboard.js +26 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +8 -1
- package/dist/esm/editor.js +2 -1
- package/dist/esm/plugins/analytics/types/toolbar-button.js +2 -0
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +1 -1
- package/dist/esm/plugins/breakout/index.js +7 -0
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -1
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +6 -1
- package/dist/esm/plugins/card/styles.js +2 -1
- package/dist/esm/plugins/card/toolbar.js +5 -1
- package/dist/esm/plugins/code-block/styles.js +16 -35
- package/dist/esm/plugins/code-block/ui/class-names.js +3 -2
- package/dist/esm/plugins/collab-edit/index.js +1 -1
- package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
- package/dist/esm/plugins/copy-button/commands.js +66 -0
- package/dist/esm/plugins/copy-button/index.js +17 -0
- package/dist/esm/plugins/copy-button/pm-plugins/main.js +26 -0
- package/dist/esm/plugins/copy-button/pm-plugins/plugin-key.js +2 -0
- package/dist/esm/plugins/copy-button/utils.js +31 -0
- package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
- package/dist/esm/plugins/custom-autoformat/index.js +1 -1
- package/dist/esm/plugins/extension/actions.js +1 -1
- package/dist/esm/plugins/extension/context-panel.js +1 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +1 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/esm/plugins/feedback-dialog/index.js +1 -1
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +1 -1
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/indentation/messages.js +14 -0
- package/dist/esm/plugins/index.js +3 -1
- package/dist/esm/plugins/list/index.js +1 -41
- package/dist/esm/plugins/macro/actions.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/picker-facade.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/media/toolbar/utils.js +1 -1
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/esm/plugins/media/utils/check-media-type.js +1 -1
- package/dist/esm/plugins/panel/toolbar.js +9 -2
- package/dist/esm/plugins/paste/handlers.js +1 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/quick-insert/index.js +1 -1
- package/dist/esm/plugins/table/commands/hover.js +2 -2
- package/dist/esm/plugins/table/toolbar.js +5 -2
- package/dist/esm/plugins/table/utils/decoration.js +5 -1
- package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +1 -1
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +51 -0
- package/dist/esm/plugins/toolbar-lists-indentation/types.js +1 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +96 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +153 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +47 -0
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +39 -0
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +6 -8
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +18 -51
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
- package/dist/esm/ui/ConfigPanel/transformers.js +1 -1
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +12 -35
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +31 -89
- package/dist/esm/ui/LinkSearch/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/utils/action.js +1 -1
- package/dist/esm/utils/clipboard.js +56 -1
- package/dist/esm/utils/extensions.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/analytics/types/toolbar-button.d.ts +3 -1
- package/dist/types/plugins/card/styles.d.ts +1 -0
- package/dist/types/plugins/copy-button/commands.d.ts +4 -0
- package/dist/types/plugins/copy-button/index.d.ts +3 -0
- package/dist/types/plugins/copy-button/pm-plugins/main.d.ts +3 -0
- package/dist/types/plugins/copy-button/pm-plugins/plugin-key.d.ts +2 -0
- package/dist/types/plugins/copy-button/utils.d.ts +7 -0
- package/dist/types/plugins/indentation/messages.d.ts +12 -0
- package/dist/types/plugins/index.d.ts +2 -0
- package/dist/types/plugins/panel/toolbar.d.ts +1 -1
- package/dist/types/plugins/table/commands/hover.d.ts +1 -1
- package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +1 -1
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +5 -0
- package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +16 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/Toolbar.d.ts +4 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.d.ts +9 -0
- package/dist/types/plugins/{list/ui/ToolbarLists → toolbar-lists-indentation/ui}/index.d.ts +4 -10
- package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +6 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -25
- package/dist/types/types/feature-flags.d.ts +18 -0
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +11 -0
- package/dist/types/utils/clipboard.d.ts +1 -0
- package/package.json +25 -25
- package/report.api.md +6747 -0
- package/dist/cjs/plugins/list/ui/ToolbarLists/index.js +0 -266
- package/dist/es2019/plugins/list/ui/ToolbarLists/index.js +0 -220
- package/dist/esm/plugins/list/ui/ToolbarLists/index.js +0 -241
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import * as clipboard from 'clipboard-polyfill';
|
|
3
4
|
export function checkClipboardTypes(type, item) {
|
|
4
5
|
var isDOMStringList = function isDOMStringList(t) {
|
|
5
6
|
return !t.indexOf && !!t.contains;
|
|
@@ -91,4 +92,58 @@ export var copyToClipboard = /*#__PURE__*/function () {
|
|
|
91
92
|
return function copyToClipboard(_x) {
|
|
92
93
|
return _ref2.apply(this, arguments);
|
|
93
94
|
};
|
|
95
|
+
}();
|
|
96
|
+
export var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
97
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(htmlToCopy) {
|
|
98
|
+
var blobInput, data, Clipboard, dt;
|
|
99
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
100
|
+
while (1) {
|
|
101
|
+
switch (_context2.prev = _context2.next) {
|
|
102
|
+
case 0:
|
|
103
|
+
if (!(isClipboardApiSupported() && typeof ClipboardItem !== 'undefined')) {
|
|
104
|
+
_context2.next = 12;
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
_context2.prev = 1;
|
|
109
|
+
blobInput = new Blob([htmlToCopy], {
|
|
110
|
+
type: 'text/html'
|
|
111
|
+
}); // @ts-ignore
|
|
112
|
+
|
|
113
|
+
data = [new ClipboardItem({
|
|
114
|
+
'text/html': blobInput
|
|
115
|
+
})]; // @ts-ignore
|
|
116
|
+
|
|
117
|
+
navigator.clipboard.write(data);
|
|
118
|
+
_context2.next = 10;
|
|
119
|
+
break;
|
|
120
|
+
|
|
121
|
+
case 7:
|
|
122
|
+
_context2.prev = 7;
|
|
123
|
+
_context2.t0 = _context2["catch"](1);
|
|
124
|
+
throw new Error('Clipboard api is not supported');
|
|
125
|
+
|
|
126
|
+
case 10:
|
|
127
|
+
_context2.next = 16;
|
|
128
|
+
break;
|
|
129
|
+
|
|
130
|
+
case 12:
|
|
131
|
+
// At the time of development, Firefox doesn't support ClipboardItem API
|
|
132
|
+
// Hence of use of this polyfill
|
|
133
|
+
Clipboard = clipboard;
|
|
134
|
+
dt = new Clipboard.DT();
|
|
135
|
+
dt.setData('text/html', htmlToCopy);
|
|
136
|
+
Clipboard.write(dt);
|
|
137
|
+
|
|
138
|
+
case 16:
|
|
139
|
+
case "end":
|
|
140
|
+
return _context2.stop();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}, _callee2, null, [[1, 7]]);
|
|
144
|
+
}));
|
|
145
|
+
|
|
146
|
+
return function copyHTMLToClipboard(_x2) {
|
|
147
|
+
return _ref3.apply(this, arguments);
|
|
148
|
+
};
|
|
94
149
|
}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Loadable from 'react-loadable';
|
|
5
5
|
import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
|
package/dist/esm/version.json
CHANGED
|
@@ -13,7 +13,9 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
|
|
|
13
13
|
TEXT_FORMATTING_STRONG = "strong",
|
|
14
14
|
TEXT_FORMATTING_ITALIC = "italic",
|
|
15
15
|
UNDO = "undo",
|
|
16
|
-
REDO = "redo"
|
|
16
|
+
REDO = "redo",
|
|
17
|
+
INDENT = "indent",
|
|
18
|
+
OUTDENT = "outdent"
|
|
17
19
|
}
|
|
18
20
|
declare type ToolbarButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_BUTTON, undefined, {}, undefined>;
|
|
19
21
|
export declare type ToolbarEventPayload = ToolbarButtonClickedAEP;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
3
|
+
import { IntlShape } from 'react-intl-next';
|
|
4
|
+
import { Command } from '../../../src/types';
|
|
5
|
+
import { FloatingToolbarItem } from '../floating-toolbar/types';
|
|
6
|
+
export declare const getCopyButtonConfig: (state: EditorState, formatMessage: IntlShape['formatMessage'], nodeType: NodeType, onMouseEnter?: Command | undefined, onMouseLeave?: Command | undefined) => FloatingToolbarItem<Command>;
|
|
7
|
+
export declare const showCopyButton: (state?: EditorState<any> | undefined) => import("prosemirror-state").Plugin<any, any> | undefined;
|
|
@@ -17,6 +17,7 @@ export { default as insertBlockPlugin } from './insert-block';
|
|
|
17
17
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
18
18
|
export { default as layoutPlugin } from './layout';
|
|
19
19
|
export { default as listPlugin } from './list';
|
|
20
|
+
export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
|
|
20
21
|
export { default as macroPlugin } from './macro';
|
|
21
22
|
export { default as maxContentSizePlugin } from './max-content-size';
|
|
22
23
|
export { default as mediaPlugin } from './media';
|
|
@@ -66,3 +67,4 @@ export { default as avatarGroupPlugin } from './avatar-group';
|
|
|
66
67
|
export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
|
|
67
68
|
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
68
69
|
export { default as codeBidiWarningPlugin } from './code-bidi-warning';
|
|
70
|
+
export { default as copyButtonPlugin } from './copy-button';
|
|
@@ -9,5 +9,5 @@ import { PanelType } from '@atlaskit/adf-schema';
|
|
|
9
9
|
export declare const panelIconMap: {
|
|
10
10
|
[key in Exclude<PanelType, PanelType.CUSTOM>]: EmojiInfo;
|
|
11
11
|
};
|
|
12
|
-
export declare const getToolbarItems: (formatMessage: IntlShape['formatMessage'], panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined) => FloatingToolbarItem<Command>[];
|
|
12
|
+
export declare const getToolbarItems: (formatMessage: IntlShape['formatMessage'], panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined, state?: EditorState<any> | undefined) => FloatingToolbarItem<Command>[];
|
|
13
13
|
export declare const getToolbarConfig: (state: EditorState, intl: IntlShape, options: PanelPluginOptions | undefined, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
@@ -2,7 +2,7 @@ import { CellColumnPositioning } from '../types';
|
|
|
2
2
|
export declare const hoverMergedCells: () => import("../../..").Command;
|
|
3
3
|
export declare const hoverColumns: (hoveredColumns: number[], isInDanger?: boolean | undefined) => import("../../..").Command;
|
|
4
4
|
export declare const hoverRows: (hoveredRows: number[], isInDanger?: boolean | undefined) => import("../../..").Command;
|
|
5
|
-
export declare const hoverTable: (isInDanger?: boolean | undefined) => import("../../..").Command;
|
|
5
|
+
export declare const hoverTable: (isInDanger?: boolean | undefined, isSelected?: boolean | undefined) => import("../../..").Command;
|
|
6
6
|
export declare const clearHoverSelection: () => import("../../..").Command;
|
|
7
7
|
export declare const showResizeHandleLine: (cellColumnPositioning: CellColumnPositioning) => import("../../..").Command;
|
|
8
8
|
export declare const hideResizeHandleLine: () => import("../../..").Command;
|
|
@@ -5,7 +5,7 @@ import { Cell, CellColumnPositioning, TableDecorations } from '../types';
|
|
|
5
5
|
export declare const findColumnControlSelectedDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
6
6
|
export declare const findControlsHoverDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
7
7
|
export declare const createCellHoverDecoration: (cells: Cell[], type: 'warning') => Decoration[];
|
|
8
|
-
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', danger?: boolean | undefined) => Decoration[];
|
|
8
|
+
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', danger?: boolean | undefined, selected?: boolean | undefined) => Decoration[];
|
|
9
9
|
export declare const createColumnSelectedDecoration: (tr: Transaction | ReadonlyTransaction) => Decoration[];
|
|
10
10
|
export declare const createColumnControlsDecoration: (selection: Selection) => Decoration[];
|
|
11
11
|
export declare const updateDecorations: (node: PmNode, decorationSet: DecorationSet, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
|
@@ -15,6 +15,6 @@ export declare const markActive: (state: EditorState, mark: PMMark) => boolean;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const anyMarkActive: (state: EditorState, markType: MarkType) => boolean;
|
|
17
17
|
export declare const checkFormattingIsPresent: (state: EditorState) => boolean;
|
|
18
|
-
export declare const usePreviousObjectState: (value:
|
|
18
|
+
export declare const usePreviousObjectState: (value: MenuIconItem[]) => MenuIconItem[];
|
|
19
19
|
export declare const compareItemsArrays: (items: MenuIconItem[], prevItems: MenuIconItem[]) => MenuIconItem[];
|
|
20
20
|
export declare const isArrayContainsContent: (items: MenuIconItem[], content: string) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
import type { onItemActivated } from './ui/onItemActivated';
|
|
3
|
+
export declare type ButtonName = 'bullet_list' | 'ordered_list' | 'indent' | 'outdent';
|
|
4
|
+
export interface ToolbarProps {
|
|
5
|
+
editorView: EditorView;
|
|
6
|
+
bulletListActive?: boolean;
|
|
7
|
+
bulletListDisabled?: boolean;
|
|
8
|
+
orderedListActive?: boolean;
|
|
9
|
+
orderedListDisabled?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
isSmall?: boolean;
|
|
12
|
+
isSeparator?: boolean;
|
|
13
|
+
isReducedSpacing?: boolean;
|
|
14
|
+
showIndentationButtons?: boolean;
|
|
15
|
+
onItemActivated: typeof onItemActivated;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { ToolbarProps } from '../types';
|
|
4
|
+
export declare type DropdownProps = ToolbarProps & {
|
|
5
|
+
popupsMountPoint?: HTMLElement;
|
|
6
|
+
popupsBoundariesElement?: HTMLElement;
|
|
7
|
+
popupsScrollableElement?: HTMLElement;
|
|
8
|
+
};
|
|
9
|
+
export declare function ToolbarDropdown(props: DropdownProps): jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
4
|
export interface Props {
|
|
5
5
|
editorView: EditorView;
|
|
@@ -9,16 +9,10 @@ export interface Props {
|
|
|
9
9
|
orderedListDisabled?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
isSmall?: boolean;
|
|
12
|
-
isSeparator?: boolean;
|
|
13
12
|
isReducedSpacing?: boolean;
|
|
14
13
|
popupsMountPoint?: HTMLElement;
|
|
15
14
|
popupsBoundariesElement?: HTMLElement;
|
|
16
15
|
popupsScrollableElement?: HTMLElement;
|
|
16
|
+
showIndentationButtons?: boolean;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
isDropdownOpen: boolean;
|
|
20
|
-
}
|
|
21
|
-
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
22
|
-
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
23
|
-
};
|
|
24
|
-
export default _default;
|
|
18
|
+
export default function ToolbarListsIndentation(props: Props): jsx.JSX.Element;
|
|
@@ -5,31 +5,6 @@ import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
|
5
5
|
export declare const ICON_HEIGHT = 40;
|
|
6
6
|
export declare const ICON_WIDTH = 40;
|
|
7
7
|
export declare const ITEM_PADDING = 12;
|
|
8
|
-
export declare const itemTheme: {
|
|
9
|
-
[x: number]: {
|
|
10
|
-
padding: {
|
|
11
|
-
default: {
|
|
12
|
-
bottom: number;
|
|
13
|
-
left: number;
|
|
14
|
-
right: number;
|
|
15
|
-
top: number;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
beforeItemSpacing: {
|
|
19
|
-
default: () => number;
|
|
20
|
-
};
|
|
21
|
-
borderRadius: () => number;
|
|
22
|
-
hover: {
|
|
23
|
-
text: import("@atlaskit/theme").ThemedValue<"var(--ds-text)">;
|
|
24
|
-
secondaryText: "var(--ds-text-subtlest)";
|
|
25
|
-
};
|
|
26
|
-
selected: {
|
|
27
|
-
background: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-subtle-hovered)">;
|
|
28
|
-
text: import("@atlaskit/theme").ThemedValue<"var(--ds-text)">;
|
|
29
|
-
secondaryText: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
8
|
export declare const itemIcon: import("@emotion/react").SerializedStyles;
|
|
34
9
|
declare type TypeAheadListItemProps = {
|
|
35
10
|
item: TypeAheadItem;
|
|
@@ -307,5 +307,23 @@ export declare type FeatureFlags = {
|
|
|
307
307
|
* @default false
|
|
308
308
|
*/
|
|
309
309
|
showHoverPreview?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* @description
|
|
312
|
+
* Show indentation buttons in the Editor toolbar
|
|
313
|
+
*
|
|
314
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/3237512038/EXPLORE+Indentation+buttons+in+the+Editor+toolbar
|
|
315
|
+
* @see https://product-fabric.atlassian.net/browse/ED-15067
|
|
316
|
+
* @default false
|
|
317
|
+
*/
|
|
318
|
+
indentationButtonsInTheToolbar?: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* @description
|
|
321
|
+
* Show copy buttons in the Floating toolbar
|
|
322
|
+
*
|
|
323
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/3237609689/Cubone+Mini+project+-+Copy+button+in+the+floating+toolbar
|
|
324
|
+
* @see https://product-fabric.atlassian.net/browse/ED-15090
|
|
325
|
+
* @default false
|
|
326
|
+
*/
|
|
327
|
+
floatingToolbarCopyButton?: boolean;
|
|
310
328
|
};
|
|
311
329
|
export declare type FeatureFlagKey = keyof FeatureFlags;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
4
5
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
6
|
import { Modes, SelectedItemProps } from '../../types';
|
|
@@ -14,5 +15,15 @@ export interface Props {
|
|
|
14
15
|
selectedCategory?: string;
|
|
15
16
|
searchTerm?: string;
|
|
16
17
|
}
|
|
18
|
+
declare type ElementItemType = {
|
|
19
|
+
inlineMode: boolean;
|
|
20
|
+
item: QuickInsertItem;
|
|
21
|
+
onInsertItem: (item: QuickInsertItem) => void;
|
|
22
|
+
selected: boolean;
|
|
23
|
+
focus: boolean;
|
|
24
|
+
setFocusedItemIndex: (index: number) => void;
|
|
25
|
+
index: number;
|
|
26
|
+
};
|
|
27
|
+
export declare function ElementItem({ inlineMode, selected, item, index, onInsertItem, focus, setFocusedItemIndex, }: ElementItemType): jsx.JSX.Element;
|
|
17
28
|
declare const MemoizedElementListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & SelectedItemProps & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "createAnalyticsEvent" | "analyticsContext" | keyof Props | keyof SelectedItemProps> & React.RefAttributes<any>>>;
|
|
18
29
|
export default MemoizedElementListWithAnalytics;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function checkClipboardTypes(type: DOMStringList | ReadonlyArray<string>, item: string): boolean;
|
|
2
2
|
export declare function isPastedFile(rawEvent: Event): boolean;
|
|
3
3
|
export declare const copyToClipboard: (textToCopy: string) => Promise<void>;
|
|
4
|
+
export declare const copyHTMLToClipboard: (htmlToCopy: string) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "169.1.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,42 +26,42 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/activity": "^1.0.1",
|
|
28
28
|
"@atlaskit/activity-provider": "^2.3.0",
|
|
29
|
-
"@atlaskit/adf-schema": "^23.
|
|
30
|
-
"@atlaskit/adf-utils": "^17.
|
|
29
|
+
"@atlaskit/adf-schema": "^23.2.0",
|
|
30
|
+
"@atlaskit/adf-utils": "^17.1.0",
|
|
31
31
|
"@atlaskit/analytics-gas-types": "^5.0.0",
|
|
32
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
33
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
32
|
+
"@atlaskit/analytics-listeners": "^8.3.0",
|
|
33
|
+
"@atlaskit/analytics-namespaced-context": "^6.5.0",
|
|
34
34
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
35
35
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
36
36
|
"@atlaskit/avatar": "^21.0.0",
|
|
37
37
|
"@atlaskit/avatar-group": "^9.0.0",
|
|
38
38
|
"@atlaskit/button": "^16.3.0",
|
|
39
|
-
"@atlaskit/calendar": "^12.
|
|
39
|
+
"@atlaskit/calendar": "^12.3.0",
|
|
40
40
|
"@atlaskit/checkbox": "^12.3.0",
|
|
41
41
|
"@atlaskit/code": "^14.3.0",
|
|
42
42
|
"@atlaskit/date": "^0.9.0",
|
|
43
|
-
"@atlaskit/datetime-picker": "^12.
|
|
43
|
+
"@atlaskit/datetime-picker": "^12.1.0",
|
|
44
44
|
"@atlaskit/droplist": "^11.0.0",
|
|
45
|
-
"@atlaskit/editor-common": "^
|
|
45
|
+
"@atlaskit/editor-common": "^69.0.0",
|
|
46
46
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
47
47
|
"@atlaskit/editor-markdown-transformer": "^4.1.0",
|
|
48
48
|
"@atlaskit/editor-shared-styles": "^2.1.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^2.1.0",
|
|
50
|
-
"@atlaskit/emoji": "^
|
|
50
|
+
"@atlaskit/emoji": "^65.0.0",
|
|
51
51
|
"@atlaskit/empty-state": "^7.3.0",
|
|
52
52
|
"@atlaskit/form": "^8.5.0",
|
|
53
53
|
"@atlaskit/icon": "^21.10.0",
|
|
54
54
|
"@atlaskit/icon-object": "^6.2.0",
|
|
55
55
|
"@atlaskit/item": "^12.0.0",
|
|
56
56
|
"@atlaskit/locale": "^2.3.0",
|
|
57
|
-
"@atlaskit/logo": "^13.
|
|
58
|
-
"@atlaskit/media-card": "^
|
|
59
|
-
"@atlaskit/media-client": "^17.
|
|
57
|
+
"@atlaskit/logo": "^13.8.0",
|
|
58
|
+
"@atlaskit/media-card": "^74.0.0",
|
|
59
|
+
"@atlaskit/media-client": "^17.1.0",
|
|
60
60
|
"@atlaskit/media-common": "^2.15.0",
|
|
61
|
-
"@atlaskit/media-filmstrip": "^
|
|
61
|
+
"@atlaskit/media-filmstrip": "^45.0.0",
|
|
62
62
|
"@atlaskit/media-picker": "^63.0.0",
|
|
63
63
|
"@atlaskit/media-ui": "^22.1.0",
|
|
64
|
-
"@atlaskit/media-viewer": "^
|
|
64
|
+
"@atlaskit/media-viewer": "^47.0.0",
|
|
65
65
|
"@atlaskit/mention": "^21.0.0",
|
|
66
66
|
"@atlaskit/menu": "^1.3.0",
|
|
67
67
|
"@atlaskit/modal-dialog": "^12.2.0",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"@types/react-virtualized": "^9.18.12",
|
|
98
98
|
"chromatism": "^2.6.0",
|
|
99
99
|
"classnames": "^2.2.5",
|
|
100
|
+
"clipboard-polyfill": "2.4.3",
|
|
100
101
|
"date-fns": "^2.17.0",
|
|
101
102
|
"eventemitter2": "^4.1.0",
|
|
102
103
|
"fuse.js": "^6.6.2",
|
|
@@ -127,8 +128,8 @@
|
|
|
127
128
|
"w3c-keyname": "^2.1.0"
|
|
128
129
|
},
|
|
129
130
|
"peerDependencies": {
|
|
130
|
-
"@atlaskit/media-core": "^33.0.
|
|
131
|
-
"@atlaskit/smart-card": "^
|
|
131
|
+
"@atlaskit/media-core": "^33.0.1",
|
|
132
|
+
"@atlaskit/smart-card": "^20.0.3",
|
|
132
133
|
"react": "^16.8.0",
|
|
133
134
|
"react-dom": "^16.8.0",
|
|
134
135
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
@@ -138,13 +139,13 @@
|
|
|
138
139
|
"@atlaskit/atlassian-navigation": "^2.2.0",
|
|
139
140
|
"@atlaskit/breadcrumbs": "11.6.2",
|
|
140
141
|
"@atlaskit/code": "^14.3.0",
|
|
141
|
-
"@atlaskit/collab-provider": "7.4.
|
|
142
|
+
"@atlaskit/collab-provider": "7.4.4",
|
|
142
143
|
"@atlaskit/docs": "*",
|
|
143
144
|
"@atlaskit/drawer": "^7.1.0",
|
|
144
145
|
"@atlaskit/dropdown-menu": "^11.2.0",
|
|
145
146
|
"@atlaskit/editor-bitbucket-transformer": "^7.2.0",
|
|
146
147
|
"@atlaskit/editor-extension-dropbox": "^0.3.0",
|
|
147
|
-
"@atlaskit/editor-test-helpers": "^17.
|
|
148
|
+
"@atlaskit/editor-test-helpers": "^17.1.0",
|
|
148
149
|
"@atlaskit/flag": "^14.6.0",
|
|
149
150
|
"@atlaskit/inline-dialog": "^13.3.0",
|
|
150
151
|
"@atlaskit/lozenge": "^11.1.0",
|
|
@@ -153,22 +154,22 @@
|
|
|
153
154
|
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
154
155
|
"@atlaskit/menu": "^1.3.0",
|
|
155
156
|
"@atlaskit/page-layout": "^1.2.0",
|
|
156
|
-
"@atlaskit/profilecard": "^16.
|
|
157
|
+
"@atlaskit/profilecard": "^16.10.0",
|
|
157
158
|
"@atlaskit/pubsub": "^6.0.0",
|
|
158
|
-
"@atlaskit/renderer": "^
|
|
159
|
+
"@atlaskit/renderer": "^98.1.0",
|
|
159
160
|
"@atlaskit/section-message": "^6.1.0",
|
|
160
161
|
"@atlaskit/share": "*",
|
|
161
|
-
"@atlaskit/smart-card": "^
|
|
162
|
+
"@atlaskit/smart-card": "^20.0.0",
|
|
162
163
|
"@atlaskit/smart-user-picker": "^5.1.0",
|
|
163
164
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
164
165
|
"@atlaskit/textarea": "^4.3.0",
|
|
165
166
|
"@atlaskit/toggle": "^12.4.0",
|
|
166
167
|
"@atlaskit/ufo": "^0.1.0",
|
|
167
|
-
"@atlaskit/util-data-test": "^17.
|
|
168
|
+
"@atlaskit/util-data-test": "^17.4.0",
|
|
168
169
|
"@atlaskit/visual-regression": "*",
|
|
169
170
|
"@atlaskit/webdriver-runner": "*",
|
|
170
171
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
171
|
-
"@atlassian/search-provider": "2.3.
|
|
172
|
+
"@atlassian/search-provider": "2.3.2",
|
|
172
173
|
"@atlassian/ufo": "^0.1.0",
|
|
173
174
|
"@emotion/jest": "^11.8.0",
|
|
174
175
|
"@testing-library/dom": "^7.7.3",
|
|
@@ -183,14 +184,13 @@
|
|
|
183
184
|
"@types/react-window": "^1.8.3",
|
|
184
185
|
"@types/rison": "^0.0.6",
|
|
185
186
|
"async-retry": "^1.2.3",
|
|
186
|
-
"clipboard-polyfill": "2.4.3",
|
|
187
187
|
"diff": "^4.0.1",
|
|
188
188
|
"enzyme": "^3.10.0",
|
|
189
189
|
"fetch-mock": "^8.0.0",
|
|
190
190
|
"jscodeshift": "^0.13.0",
|
|
191
191
|
"lz-string": "^1.4.4",
|
|
192
192
|
"mockdate": "^3.0.2",
|
|
193
|
-
"node-fetch": "^2.6.
|
|
193
|
+
"node-fetch": "^2.6.7",
|
|
194
194
|
"prettier": "^2.1.1",
|
|
195
195
|
"prosemirror-dev-tools": "^3.0.0",
|
|
196
196
|
"raf-stub": "^2.0.1",
|