@atlaskit/editor-core 172.3.2 → 173.0.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 +52 -0
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/plugins/base/index.js +8 -0
- package/dist/cjs/plugins/base/pm-plugins/composition.js +60 -0
- package/dist/cjs/plugins/breakout/index.js +5 -4
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +1 -3
- package/dist/cjs/plugins/card/pm-plugins/doc.js +8 -1
- package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +2 -36
- package/dist/cjs/plugins/collab-edit/plugin-state.js +16 -9
- package/dist/cjs/plugins/collab-edit/utils.js +16 -2
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +24 -22
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +20 -15
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +8 -5
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/cjs/plugins/paste/actions.js +13 -0
- package/dist/cjs/plugins/paste/commands.js +44 -0
- package/dist/cjs/plugins/paste/handlers.js +48 -7
- package/dist/cjs/plugins/paste/index.js +3 -2
- package/dist/cjs/plugins/paste/pm-plugins/main.js +34 -9
- package/dist/cjs/plugins/paste/pm-plugins/plugin-factory.js +62 -0
- package/dist/cjs/plugins/paste/reducer.js +47 -0
- package/dist/cjs/plugins/paste/types.js +5 -0
- package/dist/cjs/plugins/placeholder/index.js +3 -1
- package/dist/cjs/plugins/placeholder-text/index.js +9 -3
- package/dist/cjs/plugins/status/ui/statusPicker.js +4 -1
- package/dist/cjs/plugins/table/commands-with-analytics.js +59 -52
- package/dist/cjs/plugins/table/index.js +53 -36
- package/dist/cjs/plugins/table/toolbar.js +136 -20
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +3 -3
- package/dist/cjs/plugins/tasks-and-decisions/commands.js +1 -16
- package/dist/cjs/plugins/type-ahead/constants.js +3 -1
- package/dist/cjs/plugins/type-ahead/messages.js +16 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/reducer.js +2 -2
- package/dist/cjs/plugins/type-ahead/ui/AssistiveText.js +143 -0
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +59 -11
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +156 -31
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +55 -29
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +3 -3
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -2
- package/dist/cjs/plugins/type-ahead/utils.js +1 -1
- package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +8 -0
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +2 -6
- package/dist/cjs/ui/PortalProvider/index.js +26 -32
- package/dist/cjs/utils/index.js +8 -1
- package/dist/cjs/utils/selection.js +6 -8
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/plugins/base/index.js +5 -0
- package/dist/es2019/plugins/base/pm-plugins/composition.js +45 -0
- package/dist/es2019/plugins/breakout/index.js +5 -4
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -3
- package/dist/es2019/plugins/card/pm-plugins/doc.js +10 -1
- package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +3 -40
- package/dist/es2019/plugins/collab-edit/plugin-state.js +9 -3
- package/dist/es2019/plugins/collab-edit/utils.js +17 -3
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +24 -22
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +15 -7
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +9 -5
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/es2019/plugins/paste/actions.js +6 -0
- package/dist/es2019/plugins/paste/commands.js +27 -0
- package/dist/es2019/plugins/paste/handlers.js +50 -8
- package/dist/es2019/plugins/paste/index.js +3 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +29 -6
- package/dist/es2019/plugins/paste/pm-plugins/plugin-factory.js +33 -0
- package/dist/es2019/plugins/paste/reducer.js +24 -0
- package/dist/es2019/plugins/paste/types.js +1 -0
- package/dist/es2019/plugins/placeholder/index.js +2 -1
- package/dist/es2019/plugins/placeholder-text/index.js +13 -3
- package/dist/es2019/plugins/status/ui/statusPicker.js +5 -1
- package/dist/es2019/plugins/table/commands-with-analytics.js +6 -3
- package/dist/es2019/plugins/table/index.js +22 -4
- package/dist/es2019/plugins/table/toolbar.js +118 -14
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +3 -3
- package/dist/es2019/plugins/tasks-and-decisions/commands.js +0 -9
- package/dist/es2019/plugins/type-ahead/constants.js +1 -0
- package/dist/es2019/plugins/type-ahead/messages.js +16 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/reducer.js +2 -2
- package/dist/es2019/plugins/type-ahead/ui/AssistiveText.js +95 -0
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +49 -12
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +143 -29
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +64 -31
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +3 -3
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -2
- package/dist/es2019/plugins/type-ahead/utils.js +1 -1
- package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +17 -0
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +2 -5
- package/dist/es2019/ui/PortalProvider/index.js +5 -8
- package/dist/es2019/utils/index.js +6 -0
- package/dist/es2019/utils/selection.js +1 -9
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugins/base/index.js +7 -0
- package/dist/esm/plugins/base/pm-plugins/composition.js +45 -0
- package/dist/esm/plugins/breakout/index.js +5 -4
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -3
- package/dist/esm/plugins/card/pm-plugins/doc.js +8 -1
- package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +3 -37
- package/dist/esm/plugins/collab-edit/plugin-state.js +9 -3
- package/dist/esm/plugins/collab-edit/utils.js +17 -3
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +24 -22
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +20 -15
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +8 -5
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/esm/plugins/paste/actions.js +6 -0
- package/dist/esm/plugins/paste/commands.js +31 -0
- package/dist/esm/plugins/paste/handlers.js +46 -8
- package/dist/esm/plugins/paste/index.js +3 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +27 -6
- package/dist/esm/plugins/paste/pm-plugins/plugin-factory.js +46 -0
- package/dist/esm/plugins/paste/reducer.js +34 -0
- package/dist/esm/plugins/paste/types.js +1 -0
- package/dist/esm/plugins/placeholder/index.js +2 -1
- package/dist/esm/plugins/placeholder-text/index.js +9 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +4 -1
- package/dist/esm/plugins/table/commands-with-analytics.js +56 -49
- package/dist/esm/plugins/table/index.js +54 -37
- package/dist/esm/plugins/table/toolbar.js +124 -15
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +3 -3
- package/dist/esm/plugins/tasks-and-decisions/commands.js +0 -12
- package/dist/esm/plugins/type-ahead/constants.js +1 -0
- package/dist/esm/plugins/type-ahead/messages.js +16 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/reducer.js +2 -2
- package/dist/esm/plugins/type-ahead/ui/AssistiveText.js +129 -0
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +56 -12
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +151 -32
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +54 -31
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +3 -3
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -2
- package/dist/esm/plugins/type-ahead/utils.js +1 -1
- package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +7 -0
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +2 -5
- package/dist/esm/ui/PortalProvider/index.js +26 -35
- package/dist/esm/utils/index.js +4 -0
- package/dist/esm/utils/selection.js +1 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/base/pm-plugins/composition.d.ts +8 -0
- package/dist/types/plugins/code-block/pm-plugins/ide-ux.d.ts +1 -4
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -0
- package/dist/types/plugins/paste/actions.d.ts +15 -0
- package/dist/types/plugins/paste/commands.d.ts +16 -0
- package/dist/types/plugins/paste/handlers.d.ts +1 -1
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +3 -3
- package/dist/types/plugins/paste/pm-plugins/plugin-factory.d.ts +3 -0
- package/dist/types/plugins/paste/reducer.d.ts +3 -0
- package/dist/types/plugins/paste/types.d.ts +6 -0
- package/dist/types/plugins/table/commands-with-analytics.d.ts +5 -5
- package/dist/types/plugins/tasks-and-decisions/commands.d.ts +0 -2
- package/dist/types/plugins/type-ahead/constants.d.ts +1 -0
- package/dist/types/plugins/type-ahead/messages.d.ts +15 -0
- package/dist/types/plugins/type-ahead/ui/AssistiveText.d.ts +33 -0
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +3 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +6 -3
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +2 -2
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/selection.d.ts +1 -2
- package/dist/types-ts4.0/index.d.ts +1 -1
- package/dist/types-ts4.0/plugins/base/pm-plugins/composition.d.ts +8 -0
- package/dist/types-ts4.0/plugins/code-block/pm-plugins/ide-ux.d.ts +1 -4
- package/dist/types-ts4.0/plugins/floating-toolbar/ui/Dropdown.d.ts +2 -0
- package/dist/types-ts4.0/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -0
- package/dist/types-ts4.0/plugins/paste/actions.d.ts +15 -0
- package/dist/types-ts4.0/plugins/paste/commands.d.ts +16 -0
- package/dist/types-ts4.0/plugins/paste/handlers.d.ts +1 -1
- package/dist/types-ts4.0/plugins/paste/pm-plugins/main.d.ts +3 -3
- package/dist/types-ts4.0/plugins/paste/pm-plugins/plugin-factory.d.ts +3 -0
- package/dist/types-ts4.0/plugins/paste/reducer.d.ts +3 -0
- package/dist/types-ts4.0/plugins/paste/types.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +5 -5
- package/dist/types-ts4.0/plugins/tasks-and-decisions/commands.d.ts +0 -2
- package/dist/types-ts4.0/plugins/type-ahead/constants.d.ts +1 -0
- package/dist/types-ts4.0/plugins/type-ahead/messages.d.ts +15 -0
- package/dist/types-ts4.0/plugins/type-ahead/ui/AssistiveText.d.ts +33 -0
- package/dist/types-ts4.0/plugins/type-ahead/ui/InputQuery.d.ts +3 -0
- package/dist/types-ts4.0/plugins/type-ahead/ui/TypeAheadList.d.ts +6 -3
- package/dist/types-ts4.0/plugins/type-ahead/ui/TypeAheadListItem.d.ts +2 -2
- package/dist/types-ts4.0/plugins/type-ahead/ui/TypeAheadPopup.d.ts +1 -1
- package/dist/types-ts4.0/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types-ts4.0/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.0/utils/index.d.ts +1 -0
- package/dist/types-ts4.0/utils/selection.d.ts +1 -2
- package/package.json +30 -31
- package/report.api.md +161 -49
|
@@ -2,9 +2,9 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { Slice, Fragment } from 'prosemirror-model';
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
|
-
import { PluginKey } from 'prosemirror-state';
|
|
6
5
|
import uuid from 'uuid';
|
|
7
6
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
7
|
+
import { mapChildren } from '../../../utils/slice';
|
|
8
8
|
import { getExtensionAutoConvertersFromProvider } from '@atlaskit/editor-common/extensions';
|
|
9
9
|
sendPasteAnalyticsEvent;
|
|
10
10
|
import * as clipboard from '../../../utils/clipboard';
|
|
@@ -16,7 +16,7 @@ import { handleMacroAutoConvert, handleMention, handleParagraphBlockMarks } from
|
|
|
16
16
|
import { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark } from '../../code-block/utils';
|
|
17
17
|
import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent, handlePasteIntoCaptionWithAnalytics, handlePastePanelIntoListWithAnalytics } from './analytics';
|
|
18
18
|
import { analyticsPluginKey, PasteTypes } from '../../analytics';
|
|
19
|
-
import { insideTable, measurements } from '../../../utils';
|
|
19
|
+
import { isInsideBlockQuote, insideTable, measurements } from '../../../utils';
|
|
20
20
|
import { measureRender } from '@atlaskit/editor-common/utils';
|
|
21
21
|
import { transformSliceToCorrectMediaWrapper, unwrapNestedMediaElements } from '../../media/utils/media-common';
|
|
22
22
|
import { upgradeTextToLists, splitParagraphs } from '../../list/transforms';
|
|
@@ -29,16 +29,17 @@ import { clipboardTextSerializer } from './clipboard-text-serializer';
|
|
|
29
29
|
import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
|
|
30
30
|
import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils';
|
|
31
31
|
import { extractSliceFromStep } from '../../../utils/step';
|
|
32
|
-
|
|
32
|
+
import { pluginKey as stateKey, createPluginState } from './plugin-factory';
|
|
33
|
+
export { pluginKey as stateKey } from './plugin-factory';
|
|
33
34
|
export { md } from '../md';
|
|
34
|
-
export function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinkification, cardOptions, sanitizePrivateContent, providerFactory) {
|
|
35
|
+
export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, plainTextPasteLinkification, cardOptions, sanitizePrivateContent, providerFactory) {
|
|
35
36
|
var atlassianMarkDownParser = new MarkdownTransformer(schema, md);
|
|
36
37
|
|
|
37
38
|
function getMarkdownSlice(text, openStart, openEnd) {
|
|
38
39
|
var textInput = text;
|
|
39
40
|
|
|
40
|
-
if (textInput.includes('
|
|
41
|
-
textInput = textInput.replace(
|
|
41
|
+
if (textInput.includes('\\')) {
|
|
42
|
+
textInput = textInput.replace(/\\/g, '\\\\');
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
var doc = atlassianMarkDownParser.parse(escapeLinks(textInput));
|
|
@@ -103,6 +104,9 @@ export function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinki
|
|
|
103
104
|
var pastedFromBitBucket = false;
|
|
104
105
|
return new SafePlugin({
|
|
105
106
|
key: stateKey,
|
|
107
|
+
state: createPluginState(dispatch, {
|
|
108
|
+
pastedMacroPositions: {}
|
|
109
|
+
}),
|
|
106
110
|
props: {
|
|
107
111
|
// For serialising to plain text
|
|
108
112
|
clipboardTextSerializer: clipboardTextSerializer,
|
|
@@ -295,6 +299,23 @@ export function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinki
|
|
|
295
299
|
}
|
|
296
300
|
|
|
297
301
|
return handleMarkdownWithAnalytics(view, event, markdownSlice)(state, dispatch);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (isRichText && isInsideBlockQuote(state)) {
|
|
305
|
+
//If pasting inside blockquote
|
|
306
|
+
//Skip the blockquote node and keep remaining nodes as they are
|
|
307
|
+
var blockquote = schema.nodes.blockquote;
|
|
308
|
+
var children = [];
|
|
309
|
+
mapChildren(slice.content, function (node) {
|
|
310
|
+
if (node.type === blockquote) {
|
|
311
|
+
for (var i = 0; i < node.childCount; i++) {
|
|
312
|
+
children.push(node.child(i));
|
|
313
|
+
}
|
|
314
|
+
} else {
|
|
315
|
+
children.push(node);
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
slice = new Slice(Fragment.fromArray(children), slice.openStart, slice.openEnd);
|
|
298
319
|
} // finally, handle rich-text copy-paste
|
|
299
320
|
|
|
300
321
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
+
|
|
8
|
+
import { PluginKey } from 'prosemirror-state';
|
|
9
|
+
import { pluginFactory } from '../../../utils/plugin-state-factory';
|
|
10
|
+
import { reducer } from '../reducer';
|
|
11
|
+
export var pluginKey = new PluginKey('pastePlugin');
|
|
12
|
+
|
|
13
|
+
var _pluginFactory = pluginFactory(pluginKey, reducer, {
|
|
14
|
+
mapping: function mapping(tr, pluginState) {
|
|
15
|
+
if (tr.docChanged) {
|
|
16
|
+
var atLeastOnePositionChanged = false;
|
|
17
|
+
var positionsMappedThroughChanges = Object.entries(pluginState.pastedMacroPositions).reduce(function (acc, _ref) {
|
|
18
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
19
|
+
key = _ref2[0],
|
|
20
|
+
position = _ref2[1];
|
|
21
|
+
|
|
22
|
+
var mappedPosition = tr.mapping.map(position);
|
|
23
|
+
|
|
24
|
+
if (position !== mappedPosition) {
|
|
25
|
+
atLeastOnePositionChanged = true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
acc[key] = tr.mapping.map(position);
|
|
29
|
+
return acc;
|
|
30
|
+
}, {});
|
|
31
|
+
|
|
32
|
+
if (atLeastOnePositionChanged) {
|
|
33
|
+
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
34
|
+
pastedMacroPositions: positionsMappedThroughChanges
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return pluginState;
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
createPluginState = _pluginFactory.createPluginState,
|
|
43
|
+
createCommand = _pluginFactory.createCommand,
|
|
44
|
+
getPluginState = _pluginFactory.getPluginState;
|
|
45
|
+
|
|
46
|
+
export { createPluginState, createCommand, getPluginState };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
+
|
|
8
|
+
import { PastePluginActionTypes as ActionTypes } from './actions';
|
|
9
|
+
export var reducer = function reducer(state, action) {
|
|
10
|
+
switch (action.type) {
|
|
11
|
+
case ActionTypes.START_TRACKING_PASTED_MACRO_POSITIONS:
|
|
12
|
+
{
|
|
13
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
14
|
+
pastedMacroPositions: _objectSpread(_objectSpread({}, state.pastedMacroPositions), action.pastedMacroPositions)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
case ActionTypes.STOP_TRACKING_PASTED_MACRO_POSITIONS:
|
|
19
|
+
{
|
|
20
|
+
var filteredMacroPositions = Object.fromEntries(Object.entries(state.pastedMacroPositions).filter(function (_ref) {
|
|
21
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
22
|
+
key = _ref2[0];
|
|
23
|
+
|
|
24
|
+
return !action.pastedMacroPositionKeys.includes(key);
|
|
25
|
+
}));
|
|
26
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
27
|
+
pastedMacroPositions: filteredMacroPositions
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
default:
|
|
32
|
+
return state;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,6 +8,7 @@ import { placeHolderClassName } from './styles';
|
|
|
8
8
|
export var pluginKey = new PluginKey('placeholderPlugin');
|
|
9
9
|
import { focusStateKey } from '../base/pm-plugins/focus-handler';
|
|
10
10
|
import { isTypeAheadOpen } from '../type-ahead/utils';
|
|
11
|
+
import { isComposing } from '../base/pm-plugins/composition';
|
|
11
12
|
|
|
12
13
|
function getPlaceholderState(editorState) {
|
|
13
14
|
return pluginKey.getState(editorState);
|
|
@@ -134,7 +135,7 @@ export function createPlugin(defaultPlaceholderText, placeholderHints, bracketPl
|
|
|
134
135
|
placeholderText = _getPlaceholderState.placeholderText,
|
|
135
136
|
pos = _getPlaceholderState.pos;
|
|
136
137
|
|
|
137
|
-
if (hasPlaceholder && placeholderText && pos !== undefined) {
|
|
138
|
+
if (hasPlaceholder && placeholderText && pos !== undefined && !isComposing(editorState)) {
|
|
138
139
|
return createPlaceholderDecoration(editorState, placeholderText, pos);
|
|
139
140
|
}
|
|
140
141
|
|
|
@@ -72,10 +72,16 @@ export function createPlugin(dispatch, options) {
|
|
|
72
72
|
var placeholderNodeType = newState.schema.nodes.placeholder;
|
|
73
73
|
|
|
74
74
|
if (adjacentNode && adjacentNode.type === placeholderNodeType && didPlaceholderExistBeforeTxn) {
|
|
75
|
-
|
|
76
|
-
var wasContentAdded = oldState.selection.$head.pos < newState.selection.$head.pos && !isNodeEmpty(newState.selection.$head.nodeBefore);
|
|
75
|
+
var _$newHead$nodeBefore;
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
var $newHead = newState.selection.$head;
|
|
78
|
+
var $oldHead = oldState.selection.$head; // Check that cursor has moved forward in the document **and** that there is content before the cursor
|
|
79
|
+
|
|
80
|
+
var cursorMoved = $oldHead.pos < $newHead.pos;
|
|
81
|
+
var nodeBeforeHasContent = !isNodeEmpty($newHead.nodeBefore);
|
|
82
|
+
var nodeBeforeIsInline = (_$newHead$nodeBefore = $newHead.nodeBefore) === null || _$newHead$nodeBefore === void 0 ? void 0 : _$newHead$nodeBefore.type.isInline;
|
|
83
|
+
|
|
84
|
+
if (cursorMoved && (nodeBeforeHasContent || nodeBeforeIsInline)) {
|
|
79
85
|
var _NodeSelection$create = NodeSelection.create(newState.doc, adjacentNodePos),
|
|
80
86
|
$from = _NodeSelection$create.$from,
|
|
81
87
|
$to = _NodeSelection$create.$to;
|
|
@@ -51,8 +51,11 @@ export var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component
|
|
|
51
51
|
_defineProperty(_assertThisInitialized(_this), "handleClickOutside", function (event) {
|
|
52
52
|
event.preventDefault();
|
|
53
53
|
_this.inputMethod = InputMethod.blur;
|
|
54
|
+
var selectedText = window.getSelection();
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
if (!selectedText) {
|
|
57
|
+
_this.props.closeStatusPicker();
|
|
58
|
+
}
|
|
56
59
|
});
|
|
57
60
|
|
|
58
61
|
_defineProperty(_assertThisInitialized(_this), "handleEscapeKeydown", function (event) {
|
|
@@ -55,71 +55,77 @@ export var emptyMultipleCellsWithAnalytics = function emptyMultipleCellsWithAnal
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
export var mergeCellsWithAnalytics = function mergeCellsWithAnalytics(editorAnalyticsAPI) {
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var _getSelectedCellInfo2 = getSelectedCellInfo(selection),
|
|
62
|
-
horizontalCells = _getSelectedCellInfo2.horizontalCells,
|
|
63
|
-
verticalCells = _getSelectedCellInfo2.verticalCells,
|
|
64
|
-
totalCells = _getSelectedCellInfo2.totalCells,
|
|
65
|
-
totalRowCount = _getSelectedCellInfo2.totalRowCount,
|
|
66
|
-
totalColumnCount = _getSelectedCellInfo2.totalColumnCount;
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
action: TABLE_ACTION.MERGED,
|
|
70
|
-
actionSubject: ACTION_SUBJECT.TABLE,
|
|
71
|
-
actionSubjectId: null,
|
|
72
|
-
attributes: {
|
|
73
|
-
horizontalCells: horizontalCells,
|
|
74
|
-
verticalCells: verticalCells,
|
|
75
|
-
totalCells: totalCells,
|
|
76
|
-
totalRowCount: totalRowCount,
|
|
77
|
-
totalColumnCount: totalColumnCount
|
|
78
|
-
},
|
|
79
|
-
eventType: EVENT_TYPE.TRACK
|
|
80
|
-
};
|
|
81
|
-
})(editorAnalyticsAPI)(function (state, dispatch) {
|
|
82
|
-
if (dispatch) {
|
|
83
|
-
dispatch(mergeCells(state.tr));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return true;
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
export var splitCellWithAnalytics = function splitCellWithAnalytics(editorAnalyticsAPI) {
|
|
90
|
-
return withEditorAnalyticsAPI(function (_ref3) {
|
|
91
|
-
var selection = _ref3.selection;
|
|
92
|
-
|
|
93
|
-
var _getSelectedCellInfo3 = getSelectedCellInfo(selection),
|
|
94
|
-
totalRowCount = _getSelectedCellInfo3.totalRowCount,
|
|
95
|
-
totalColumnCount = _getSelectedCellInfo3.totalColumnCount;
|
|
58
|
+
return function (inputMethod) {
|
|
59
|
+
return withEditorAnalyticsAPI(function (_ref2) {
|
|
60
|
+
var selection = _ref2.selection;
|
|
96
61
|
|
|
97
|
-
|
|
62
|
+
var _getSelectedCellInfo2 = getSelectedCellInfo(selection),
|
|
63
|
+
horizontalCells = _getSelectedCellInfo2.horizontalCells,
|
|
64
|
+
verticalCells = _getSelectedCellInfo2.verticalCells,
|
|
65
|
+
totalCells = _getSelectedCellInfo2.totalCells,
|
|
66
|
+
totalRowCount = _getSelectedCellInfo2.totalRowCount,
|
|
67
|
+
totalColumnCount = _getSelectedCellInfo2.totalColumnCount;
|
|
98
68
|
|
|
99
|
-
if (cell) {
|
|
100
|
-
var _cell$node$attrs = cell.node.attrs,
|
|
101
|
-
verticalCells = _cell$node$attrs.rowspan,
|
|
102
|
-
horizontalCells = _cell$node$attrs.colspan;
|
|
103
69
|
return {
|
|
104
|
-
action: TABLE_ACTION.
|
|
70
|
+
action: TABLE_ACTION.MERGED,
|
|
105
71
|
actionSubject: ACTION_SUBJECT.TABLE,
|
|
106
72
|
actionSubjectId: null,
|
|
107
73
|
attributes: {
|
|
74
|
+
inputMethod: inputMethod,
|
|
108
75
|
horizontalCells: horizontalCells,
|
|
109
76
|
verticalCells: verticalCells,
|
|
110
|
-
totalCells:
|
|
77
|
+
totalCells: totalCells,
|
|
111
78
|
totalRowCount: totalRowCount,
|
|
112
79
|
totalColumnCount: totalColumnCount
|
|
113
80
|
},
|
|
114
81
|
eventType: EVENT_TYPE.TRACK
|
|
115
82
|
};
|
|
116
|
-
}
|
|
83
|
+
})(editorAnalyticsAPI)(function (state, dispatch) {
|
|
84
|
+
if (dispatch) {
|
|
85
|
+
dispatch(mergeCells(state.tr));
|
|
86
|
+
}
|
|
117
87
|
|
|
118
|
-
|
|
119
|
-
|
|
88
|
+
return true;
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export var splitCellWithAnalytics = function splitCellWithAnalytics(editorAnalyticsAPI) {
|
|
93
|
+
return function (inputMethod) {
|
|
94
|
+
return withEditorAnalyticsAPI(function (_ref3) {
|
|
95
|
+
var selection = _ref3.selection;
|
|
96
|
+
|
|
97
|
+
var _getSelectedCellInfo3 = getSelectedCellInfo(selection),
|
|
98
|
+
totalRowCount = _getSelectedCellInfo3.totalRowCount,
|
|
99
|
+
totalColumnCount = _getSelectedCellInfo3.totalColumnCount;
|
|
100
|
+
|
|
101
|
+
var cell = findCellClosestToPos(selection.$anchor);
|
|
102
|
+
|
|
103
|
+
if (cell) {
|
|
104
|
+
var _cell$node$attrs = cell.node.attrs,
|
|
105
|
+
verticalCells = _cell$node$attrs.rowspan,
|
|
106
|
+
horizontalCells = _cell$node$attrs.colspan;
|
|
107
|
+
return {
|
|
108
|
+
action: TABLE_ACTION.SPLIT,
|
|
109
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
110
|
+
actionSubjectId: null,
|
|
111
|
+
attributes: {
|
|
112
|
+
inputMethod: inputMethod,
|
|
113
|
+
horizontalCells: horizontalCells,
|
|
114
|
+
verticalCells: verticalCells,
|
|
115
|
+
totalCells: horizontalCells * verticalCells,
|
|
116
|
+
totalRowCount: totalRowCount,
|
|
117
|
+
totalColumnCount: totalColumnCount
|
|
118
|
+
},
|
|
119
|
+
eventType: EVENT_TYPE.TRACK
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return;
|
|
124
|
+
})(editorAnalyticsAPI)(splitCell);
|
|
125
|
+
};
|
|
120
126
|
};
|
|
121
127
|
export var setColorWithAnalytics = function setColorWithAnalytics(editorAnalyticsAPI) {
|
|
122
|
-
return function (cellColor, targetCellPosition) {
|
|
128
|
+
return function (inputMethod, cellColor, targetCellPosition) {
|
|
123
129
|
return withEditorAnalyticsAPI(function (_ref4) {
|
|
124
130
|
var selection = _ref4.selection;
|
|
125
131
|
|
|
@@ -135,6 +141,7 @@ export var setColorWithAnalytics = function setColorWithAnalytics(editorAnalytic
|
|
|
135
141
|
actionSubject: ACTION_SUBJECT.TABLE,
|
|
136
142
|
actionSubjectId: null,
|
|
137
143
|
attributes: {
|
|
144
|
+
inputMethod: inputMethod,
|
|
138
145
|
cellColor: (tableBackgroundColorPalette.get(cellColor.toLowerCase()) || cellColor).toLowerCase(),
|
|
139
146
|
horizontalCells: horizontalCells,
|
|
140
147
|
verticalCells: verticalCells,
|
|
@@ -5,7 +5,7 @@ import { createTable } from '@atlaskit/editor-tables/utils';
|
|
|
5
5
|
import { table, tableCell, tableHeader, tableRow } from '@atlaskit/adf-schema';
|
|
6
6
|
import { toggleTable, tooltip } from '../../keymaps';
|
|
7
7
|
import WithPluginState from '../../ui/WithPluginState';
|
|
8
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
10
10
|
import { IconTable } from '@atlaskit/editor-common/icons';
|
|
11
11
|
import { pluginConfig } from './create-plugin-config';
|
|
@@ -116,21 +116,38 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
116
116
|
}, {
|
|
117
117
|
name: 'tableEditing',
|
|
118
118
|
plugin: function plugin() {
|
|
119
|
-
return tableEditing(
|
|
119
|
+
return tableEditing({
|
|
120
|
+
reportFixedTable: function reportFixedTable(_ref5) {
|
|
121
|
+
var _options$editorAnalyt;
|
|
122
|
+
|
|
123
|
+
var state = _ref5.state,
|
|
124
|
+
tr = _ref5.tr,
|
|
125
|
+
reason = _ref5.reason;
|
|
126
|
+
options === null || options === void 0 ? void 0 : (_options$editorAnalyt = options.editorAnalyticsAPI) === null || _options$editorAnalyt === void 0 ? void 0 : _options$editorAnalyt.attachAnalyticsEvent({
|
|
127
|
+
action: TABLE_ACTION.FIXED,
|
|
128
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
129
|
+
actionSubjectId: null,
|
|
130
|
+
attributes: {
|
|
131
|
+
reason: reason
|
|
132
|
+
},
|
|
133
|
+
eventType: EVENT_TYPE.TRACK
|
|
134
|
+
})(tr);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
120
137
|
}
|
|
121
138
|
}, {
|
|
122
139
|
name: 'tableStickyHeaders',
|
|
123
|
-
plugin: function plugin(
|
|
124
|
-
var dispatch =
|
|
125
|
-
eventDispatcher =
|
|
140
|
+
plugin: function plugin(_ref6) {
|
|
141
|
+
var dispatch = _ref6.dispatch,
|
|
142
|
+
eventDispatcher = _ref6.eventDispatcher;
|
|
126
143
|
return options && options.tableOptions.stickyHeaders ? createStickyHeadersPlugin(dispatch, eventDispatcher, function () {
|
|
127
144
|
return [];
|
|
128
145
|
}, (options === null || options === void 0 ? void 0 : options.getEditorFeatureFlags) || defaultGetEditorFeatureFlags) : undefined;
|
|
129
146
|
}
|
|
130
147
|
}, {
|
|
131
148
|
name: 'tableLocalId',
|
|
132
|
-
plugin: function plugin(
|
|
133
|
-
var dispatch =
|
|
149
|
+
plugin: function plugin(_ref7) {
|
|
150
|
+
var dispatch = _ref7.dispatch;
|
|
134
151
|
return createTableLocalIdPlugin(dispatch);
|
|
135
152
|
}
|
|
136
153
|
}]; // workaround for prosemirrors delayed dom selection syncing during pointer drag
|
|
@@ -161,12 +178,12 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
161
178
|
|
|
162
179
|
return plugins;
|
|
163
180
|
},
|
|
164
|
-
contentComponent: function contentComponent(
|
|
165
|
-
var editorView =
|
|
166
|
-
popupsMountPoint =
|
|
167
|
-
popupsBoundariesElement =
|
|
168
|
-
popupsScrollableElement =
|
|
169
|
-
dispatchAnalyticsEvent =
|
|
181
|
+
contentComponent: function contentComponent(_ref8) {
|
|
182
|
+
var editorView = _ref8.editorView,
|
|
183
|
+
popupsMountPoint = _ref8.popupsMountPoint,
|
|
184
|
+
popupsBoundariesElement = _ref8.popupsBoundariesElement,
|
|
185
|
+
popupsScrollableElement = _ref8.popupsScrollableElement,
|
|
186
|
+
dispatchAnalyticsEvent = _ref8.dispatchAnalyticsEvent;
|
|
170
187
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
171
188
|
component: ACTION_SUBJECT.TABLES_PLUGIN,
|
|
172
189
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
@@ -177,25 +194,25 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
177
194
|
tableResizingPluginState: tableResizingPluginKey,
|
|
178
195
|
stickyHeadersState: stickyHeadersPluginKey
|
|
179
196
|
},
|
|
180
|
-
render: function render(
|
|
181
|
-
var resizingPluginState =
|
|
182
|
-
stickyHeadersState =
|
|
183
|
-
tablePluginState =
|
|
197
|
+
render: function render(_ref9) {
|
|
198
|
+
var resizingPluginState = _ref9.tableResizingPluginState,
|
|
199
|
+
stickyHeadersState = _ref9.stickyHeadersState,
|
|
200
|
+
tablePluginState = _ref9.tablePluginState;
|
|
184
201
|
var state = editorView.state;
|
|
185
202
|
var isDragging = resizingPluginState === null || resizingPluginState === void 0 ? void 0 : resizingPluginState.dragging;
|
|
186
|
-
var
|
|
187
|
-
tableNode =
|
|
188
|
-
tablePos =
|
|
189
|
-
targetCellPosition =
|
|
190
|
-
isContextualMenuOpen =
|
|
191
|
-
layout =
|
|
192
|
-
tableRef =
|
|
193
|
-
pluginConfig =
|
|
194
|
-
insertColumnButtonIndex =
|
|
195
|
-
insertRowButtonIndex =
|
|
196
|
-
isHeaderColumnEnabled =
|
|
197
|
-
isHeaderRowEnabled =
|
|
198
|
-
tableWrapperTarget =
|
|
203
|
+
var _ref10 = tablePluginState,
|
|
204
|
+
tableNode = _ref10.tableNode,
|
|
205
|
+
tablePos = _ref10.tablePos,
|
|
206
|
+
targetCellPosition = _ref10.targetCellPosition,
|
|
207
|
+
isContextualMenuOpen = _ref10.isContextualMenuOpen,
|
|
208
|
+
layout = _ref10.layout,
|
|
209
|
+
tableRef = _ref10.tableRef,
|
|
210
|
+
pluginConfig = _ref10.pluginConfig,
|
|
211
|
+
insertColumnButtonIndex = _ref10.insertColumnButtonIndex,
|
|
212
|
+
insertRowButtonIndex = _ref10.insertRowButtonIndex,
|
|
213
|
+
isHeaderColumnEnabled = _ref10.isHeaderColumnEnabled,
|
|
214
|
+
isHeaderRowEnabled = _ref10.isHeaderRowEnabled,
|
|
215
|
+
tableWrapperTarget = _ref10.tableWrapperTarget;
|
|
199
216
|
var allowControls = pluginConfig.allowControls;
|
|
200
217
|
var stickyHeader = stickyHeadersState ? findStickyHeaderForTable(stickyHeadersState, tablePos) : undefined;
|
|
201
218
|
return /*#__PURE__*/React.createElement(React.Fragment, null, targetCellPosition && tableRef && !isDragging && options && options.allowContextualMenu && /*#__PURE__*/React.createElement(FloatingContextualButton, {
|
|
@@ -260,9 +277,9 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
260
277
|
pluginsOptions: {
|
|
261
278
|
// TODO: ED-14676 This is not the final API design
|
|
262
279
|
// For now, we are using this on (insert-api/api.ts) but we may create a proper place for it
|
|
263
|
-
createNodeHandler: function createNodeHandler(
|
|
264
|
-
var nodeName =
|
|
265
|
-
schema =
|
|
280
|
+
createNodeHandler: function createNodeHandler(_ref11) {
|
|
281
|
+
var nodeName = _ref11.nodeName,
|
|
282
|
+
schema = _ref11.schema;
|
|
266
283
|
|
|
267
284
|
// An EditorPlugin may manage more than one node.
|
|
268
285
|
if (nodeName !== 'table') {
|
|
@@ -274,8 +291,8 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
274
291
|
});
|
|
275
292
|
return table;
|
|
276
293
|
},
|
|
277
|
-
quickInsert: function quickInsert(
|
|
278
|
-
var formatMessage =
|
|
294
|
+
quickInsert: function quickInsert(_ref12) {
|
|
295
|
+
var formatMessage = _ref12.formatMessage;
|
|
279
296
|
return [{
|
|
280
297
|
id: 'table',
|
|
281
298
|
title: formatMessage(messages.table),
|
|
@@ -287,12 +304,12 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
287
304
|
return /*#__PURE__*/React.createElement(IconTable, null);
|
|
288
305
|
},
|
|
289
306
|
action: function action(insert, state) {
|
|
290
|
-
var _options$
|
|
307
|
+
var _options$editorAnalyt2;
|
|
291
308
|
|
|
292
309
|
var tr = insert(createTable({
|
|
293
310
|
schema: state.schema
|
|
294
311
|
}));
|
|
295
|
-
options === null || options === void 0 ? void 0 : (_options$
|
|
312
|
+
options === null || options === void 0 ? void 0 : (_options$editorAnalyt2 = options.editorAnalyticsAPI) === null || _options$editorAnalyt2 === void 0 ? void 0 : _options$editorAnalyt2.attachAnalyticsEvent({
|
|
296
313
|
action: ACTION.INSERTED,
|
|
297
314
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
298
315
|
actionSubjectId: ACTION_SUBJECT_ID.TABLE,
|