@atlaskit/editor-plugin-table 3.0.3 → 3.0.4
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/table/pm-plugins/table-local-id.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -1
- package/dist/types/plugins/table/pm-plugins/table-local-id.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +1 -1
- package/package.json +4 -4
- package/src/plugins/table/pm-plugins/table-local-id.ts +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9e36c4aec5c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9e36c4aec5c) - Fixed a bug in the local id plugin where it was deferred dispatching a transaction created from and old state causing the "Applying a mismatched transaction" runtime error to occur.
|
|
8
|
+
|
|
3
9
|
## 3.0.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -91,7 +91,7 @@ var createPlugin = function createPlugin(dispatch) {
|
|
|
91
91
|
}
|
|
92
92
|
var table = state.schema.nodes.table;
|
|
93
93
|
(0, _rafSchd.default)(function () {
|
|
94
|
-
var tr = state.tr;
|
|
94
|
+
var tr = editorView.state.tr;
|
|
95
95
|
var tableIdWasAdded = false;
|
|
96
96
|
editorView.state.doc.descendants(function (node, pos) {
|
|
97
97
|
var isTable = node.type === table;
|
|
@@ -83,7 +83,7 @@ const createPlugin = dispatch => new SafePlugin({
|
|
|
83
83
|
table
|
|
84
84
|
} = state.schema.nodes;
|
|
85
85
|
rafSchedule(() => {
|
|
86
|
-
const tr = state.tr;
|
|
86
|
+
const tr = editorView.state.tr;
|
|
87
87
|
let tableIdWasAdded = false;
|
|
88
88
|
editorView.state.doc.descendants((node, pos) => {
|
|
89
89
|
const isTable = node.type === table;
|
|
@@ -85,7 +85,7 @@ var createPlugin = function createPlugin(dispatch) {
|
|
|
85
85
|
}
|
|
86
86
|
var table = state.schema.nodes.table;
|
|
87
87
|
rafSchedule(function () {
|
|
88
|
-
var tr = state.tr;
|
|
88
|
+
var tr = editorView.state.tr;
|
|
89
89
|
var tableIdWasAdded = false;
|
|
90
90
|
editorView.state.doc.descendants(function (node, pos) {
|
|
91
91
|
var isTable = node.type === table;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
interface TableLocalIdPluginState {
|
|
4
4
|
parsedForLocalIds: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
interface TableLocalIdPluginState {
|
|
4
4
|
parsedForLocalIds: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/adf-schema": "^29.1.0",
|
|
31
|
-
"@atlaskit/editor-common": "^75.
|
|
31
|
+
"@atlaskit/editor-common": "^75.2.0",
|
|
32
32
|
"@atlaskit/editor-palette": "1.5.1",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
34
34
|
"@atlaskit/editor-plugin-content-insertion": "^0.1.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/icon": "^21.12.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
40
40
|
"@atlaskit/theme": "^12.6.0",
|
|
41
|
-
"@atlaskit/tokens": "^1.
|
|
41
|
+
"@atlaskit/tokens": "^1.25.0",
|
|
42
42
|
"@atlaskit/tooltip": "^17.8.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
60
60
|
"@atlaskit/editor-plugin-grid": "^0.2.0",
|
|
61
61
|
"@atlaskit/editor-plugin-guideline": "^0.5.0",
|
|
62
|
-
"@atlaskit/editor-plugin-hyperlink": "^0.
|
|
62
|
+
"@atlaskit/editor-plugin-hyperlink": "^0.5.0",
|
|
63
63
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
64
64
|
"@atlaskit/visual-regression": "*",
|
|
65
65
|
"@atlaskit/webdriver-runner": "*",
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
import rafSchedule from 'raf-schd';
|
|
14
14
|
|
|
15
15
|
import { uuid } from '@atlaskit/adf-schema';
|
|
16
|
-
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
16
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
17
17
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
18
18
|
import { stepHasSlice } from '@atlaskit/editor-common/utils';
|
|
19
|
-
import { Node as ProsemirrorNode } from '@atlaskit/editor-prosemirror/model';
|
|
20
|
-
import { EditorState
|
|
19
|
+
import type { Node as ProsemirrorNode } from '@atlaskit/editor-prosemirror/model';
|
|
20
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
21
|
+
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
21
22
|
|
|
22
23
|
interface TableLocalIdPluginState {
|
|
23
24
|
// One time parse for initial load with existing tables without localIds
|
|
@@ -95,7 +96,7 @@ const createPlugin = (dispatch: Dispatch) =>
|
|
|
95
96
|
|
|
96
97
|
const { table } = state.schema.nodes;
|
|
97
98
|
rafSchedule(() => {
|
|
98
|
-
const tr = state.tr;
|
|
99
|
+
const tr = editorView.state.tr;
|
|
99
100
|
let tableIdWasAdded = false;
|
|
100
101
|
editorView.state.doc.descendants((node, pos) => {
|
|
101
102
|
const isTable = node.type === table;
|