@atlaskit/editor-core 187.2.5 → 187.2.7
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 +6 -0
- package/dist/cjs/plugins/paste/handlers.js +9 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/paste/handlers.js +9 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/paste/handlers.js +9 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/paste/handlers.d.ts +7 -6
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +5 -5
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +7 -6
- package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +5 -5
- package/package.json +2 -2
- package/tmp/api-report-tmp.d.ts +2257 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`022b25d8eed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/022b25d8eed) - ED-17862: Fixed cusor position after pasting panel decisions in the same table cell."
|
|
8
|
+
|
|
3
9
|
## 187.2.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -812,7 +812,16 @@ function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
812
812
|
schema: schema
|
|
813
813
|
});
|
|
814
814
|
} else if (noNeedForSafeInsert) {
|
|
815
|
+
var _slice$content$lastCh, _slice$content$lastCh2;
|
|
815
816
|
tr.replaceSelection(slice);
|
|
817
|
+
// when cursor is inside a table cell, and slice.content.lastChild is a panel, expand, or decisionList
|
|
818
|
+
// need to make sure the cursor position is is right after the panel, expand, or decisionList
|
|
819
|
+
// still in the same table cell, see issue: https://product-fabric.atlassian.net/browse/ED-17862
|
|
820
|
+
var shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 ? void 0 : (_slice$content$lastCh2 = _slice$content$lastCh.type) === null || _slice$content$lastCh2 === void 0 ? void 0 : _slice$content$lastCh2.name) || '');
|
|
821
|
+
if ((0, _utils2.insideTableCell)(state) && shouldUpdateCursorPosAfterPaste) {
|
|
822
|
+
var nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
|
|
823
|
+
tr.setSelection(new _gapCursorSelection.GapCursorSelection(nextPos, _gapCursorSelection.Side.RIGHT));
|
|
824
|
+
}
|
|
816
825
|
} else {
|
|
817
826
|
// need to scan the slice if there's a block node or list items inside it
|
|
818
827
|
var doesBlockNodeExist = false;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.2.
|
|
9
|
+
var version = "187.2.7";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -796,7 +796,16 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
796
796
|
schema
|
|
797
797
|
});
|
|
798
798
|
} else if (noNeedForSafeInsert) {
|
|
799
|
+
var _slice$content$lastCh, _slice$content$lastCh2;
|
|
799
800
|
tr.replaceSelection(slice);
|
|
801
|
+
// when cursor is inside a table cell, and slice.content.lastChild is a panel, expand, or decisionList
|
|
802
|
+
// need to make sure the cursor position is is right after the panel, expand, or decisionList
|
|
803
|
+
// still in the same table cell, see issue: https://product-fabric.atlassian.net/browse/ED-17862
|
|
804
|
+
const shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 ? void 0 : (_slice$content$lastCh2 = _slice$content$lastCh.type) === null || _slice$content$lastCh2 === void 0 ? void 0 : _slice$content$lastCh2.name) || '');
|
|
805
|
+
if (insideTableCell(state) && shouldUpdateCursorPosAfterPaste) {
|
|
806
|
+
const nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
|
|
807
|
+
tr.setSelection(new GapCursorSelection(nextPos, Side.RIGHT));
|
|
808
|
+
}
|
|
800
809
|
} else {
|
|
801
810
|
// need to scan the slice if there's a block node or list items inside it
|
|
802
811
|
let doesBlockNodeExist = false;
|
package/dist/es2019/version.json
CHANGED
|
@@ -790,7 +790,16 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
790
790
|
schema: schema
|
|
791
791
|
});
|
|
792
792
|
} else if (noNeedForSafeInsert) {
|
|
793
|
+
var _slice$content$lastCh, _slice$content$lastCh2;
|
|
793
794
|
tr.replaceSelection(slice);
|
|
795
|
+
// when cursor is inside a table cell, and slice.content.lastChild is a panel, expand, or decisionList
|
|
796
|
+
// need to make sure the cursor position is is right after the panel, expand, or decisionList
|
|
797
|
+
// still in the same table cell, see issue: https://product-fabric.atlassian.net/browse/ED-17862
|
|
798
|
+
var shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 ? void 0 : (_slice$content$lastCh2 = _slice$content$lastCh.type) === null || _slice$content$lastCh2 === void 0 ? void 0 : _slice$content$lastCh2.name) || '');
|
|
799
|
+
if (insideTableCell(state) && shouldUpdateCursorPosAfterPaste) {
|
|
800
|
+
var nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
|
|
801
|
+
tr.setSelection(new GapCursorSelection(nextPos, Side.RIGHT));
|
|
802
|
+
}
|
|
794
803
|
} else {
|
|
795
804
|
// need to scan the slice if there's a block node or list items inside it
|
|
796
805
|
var doesBlockNodeExist = false;
|
package/dist/esm/version.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Slice } from 'prosemirror-model';
|
|
2
|
+
import type { Schema } from 'prosemirror-model';
|
|
3
|
+
import type { EditorState } from 'prosemirror-state';
|
|
4
|
+
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import type { Command } from '../../types';
|
|
6
|
+
import type { InputMethodInsertMedia } from '../analytics';
|
|
7
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
7
8
|
import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
|
|
8
9
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
9
10
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Schema } from 'prosemirror-model';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import { DispatchAnalyticsEvent } from '../../analytics';
|
|
3
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import type { DispatchAnalyticsEvent } from '../../analytics';
|
|
6
6
|
export { pluginKey as stateKey } from './plugin-factory';
|
|
7
7
|
import type { Dispatch } from '../../../event-dispatcher';
|
|
8
|
-
import { FeatureFlags, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { FeatureFlags, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type pastePlugin from '../';
|
|
10
10
|
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory): SafePlugin<any>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Slice } from 'prosemirror-model';
|
|
2
|
+
import type { Schema } from 'prosemirror-model';
|
|
3
|
+
import type { EditorState } from 'prosemirror-state';
|
|
4
|
+
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import type { Command } from '../../types';
|
|
6
|
+
import type { InputMethodInsertMedia } from '../analytics';
|
|
7
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
7
8
|
import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
|
|
8
9
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
9
10
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Schema } from 'prosemirror-model';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import { DispatchAnalyticsEvent } from '../../analytics';
|
|
3
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import type { DispatchAnalyticsEvent } from '../../analytics';
|
|
6
6
|
export { pluginKey as stateKey } from './plugin-factory';
|
|
7
7
|
import type { Dispatch } from '../../../event-dispatcher';
|
|
8
|
-
import { FeatureFlags, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { FeatureFlags, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type pastePlugin from '../';
|
|
10
10
|
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory): SafePlugin<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.2.
|
|
3
|
+
"version": "187.2.7",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"@af/editor-libra": "*",
|
|
148
148
|
"@af/integration-testing": "*",
|
|
149
149
|
"@atlaskit/code": "^14.6.0",
|
|
150
|
-
"@atlaskit/collab-provider": "9.7.
|
|
150
|
+
"@atlaskit/collab-provider": "9.7.3",
|
|
151
151
|
"@atlaskit/dropdown-menu": "^11.10.0",
|
|
152
152
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
153
153
|
"@atlaskit/editor-plugin-table": "^2.5.0",
|