@atlaskit/editor-plugin-table 22.2.8 → 22.2.9
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/pm-plugins/analytics/plugin-factory.js +4 -4
- package/dist/cjs/pm-plugins/drag-and-drop/plugin-factory.js +19 -19
- package/dist/cjs/pm-plugins/plugin-factory.js +30 -30
- package/dist/cjs/pm-plugins/sticky-headers/plugin-state.js +16 -16
- package/dist/es2019/pm-plugins/analytics/plugin-factory.js +4 -5
- package/dist/es2019/pm-plugins/drag-and-drop/plugin-factory.js +6 -9
- package/dist/es2019/pm-plugins/plugin-factory.js +5 -6
- package/dist/es2019/pm-plugins/sticky-headers/plugin-state.js +3 -4
- package/dist/esm/pm-plugins/analytics/plugin-factory.js +4 -5
- package/dist/esm/pm-plugins/drag-and-drop/plugin-factory.js +19 -20
- package/dist/esm/pm-plugins/plugin-factory.js +30 -31
- package/dist/esm/pm-plugins/sticky-headers/plugin-state.js +16 -16
- package/dist/types/pm-plugins/analytics/plugin-factory.d.ts +8 -1
- package/dist/types/pm-plugins/drag-and-drop/plugin-factory.d.ts +8 -1
- package/dist/types/pm-plugins/plugin-factory.d.ts +7 -1
- package/dist/types/pm-plugins/sticky-headers/plugin-state.d.ts +5 -1
- package/dist/types/pm-plugins/table-width-in-comment-fix.d.ts +1 -3
- package/dist/types/pm-plugins/table-width.d.ts +1 -5
- package/dist/types/pm-plugins/view-mode-sort/index.d.ts +4 -2
- package/dist/types/ui/FloatingContextualButton/index.d.ts +1 -2
- package/dist/types/ui/FloatingContextualMenu/index.d.ts +1 -6
- package/dist/types-ts4.5/pm-plugins/analytics/plugin-factory.d.ts +8 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin-factory.d.ts +8 -1
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +7 -1
- package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin-state.d.ts +5 -1
- package/dist/types-ts4.5/pm-plugins/table-width-in-comment-fix.d.ts +1 -3
- package/dist/types-ts4.5/pm-plugins/table-width.d.ts +1 -5
- package/dist/types-ts4.5/pm-plugins/view-mode-sort/index.d.ts +5 -3
- package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/FloatingContextualMenu/index.d.ts +1 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ exports.getPluginState = exports.createPluginState = exports.createCommand = voi
|
|
|
7
7
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
8
|
var _pluginKey = require("./plugin-key");
|
|
9
9
|
var _reducer = require("./reducer");
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
var dest = (0, _utils.pluginFactory)(_pluginKey.pluginKey, _reducer.reducer);
|
|
11
|
+
var createPluginState = exports.createPluginState = dest.createPluginState;
|
|
12
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
13
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
@@ -12,24 +12,24 @@ var _pluginKey2 = require("./plugin-key");
|
|
|
12
12
|
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
if (decorationSet) {
|
|
24
|
-
decorationSet = decorationSet.map(tr.mapping, tr.doc);
|
|
25
|
-
}
|
|
26
|
-
return _objectSpread(_objectSpread({}, pluginState), {
|
|
27
|
-
decorationSet: decorationSet
|
|
28
|
-
});
|
|
15
|
+
var dest = (0, _utils.pluginFactory)(_pluginKey2.pluginKey, _reducer.default, {
|
|
16
|
+
mapping: function mapping(tr, pluginState) {
|
|
17
|
+
if (tr.docChanged) {
|
|
18
|
+
var decorationSet = pluginState.decorationSet;
|
|
19
|
+
var meta = tr.getMeta(_pluginKey.pluginKey);
|
|
20
|
+
if (meta && meta.data && meta.data.decorationSet) {
|
|
21
|
+
decorationSet = meta.data.decorationSet;
|
|
29
22
|
}
|
|
30
|
-
|
|
23
|
+
if (decorationSet) {
|
|
24
|
+
decorationSet = decorationSet.map(tr.mapping, tr.doc);
|
|
25
|
+
}
|
|
26
|
+
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
27
|
+
decorationSet: decorationSet
|
|
28
|
+
});
|
|
31
29
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
return pluginState;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var createPluginState = exports.createPluginState = dest.createPluginState;
|
|
34
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
35
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
@@ -12,34 +12,34 @@ var _pluginKey = require("./plugin-key");
|
|
|
12
12
|
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
var updatedTablePos = {};
|
|
28
|
-
if (pluginState.tablePos) {
|
|
29
|
-
var _tr$mapping$mapResult2 = tr.mapping.mapResult(pluginState.tablePos, -1),
|
|
30
|
-
_pos = _tr$mapping$mapResult2.pos,
|
|
31
|
-
_deleted = _tr$mapping$mapResult2.deleted;
|
|
32
|
-
updatedTablePos = {
|
|
33
|
-
tablePos: _deleted ? undefined : _pos
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return _objectSpread(_objectSpread(_objectSpread({}, pluginState), updatedTargetCell), updatedTablePos);
|
|
15
|
+
var dest = (0, _utils.pluginFactory)(_pluginKey.pluginKey, _reducer.default, {
|
|
16
|
+
mapping: function mapping(tr, pluginState) {
|
|
17
|
+
if (tr.docChanged) {
|
|
18
|
+
var updatedTargetCell = {};
|
|
19
|
+
if (pluginState.targetCellPosition) {
|
|
20
|
+
var _tr$mapping$mapResult = tr.mapping.mapResult(pluginState.targetCellPosition),
|
|
21
|
+
pos = _tr$mapping$mapResult.pos,
|
|
22
|
+
deleted = _tr$mapping$mapResult.deleted;
|
|
23
|
+
updatedTargetCell = {
|
|
24
|
+
targetCellPosition: deleted ? undefined : pos
|
|
25
|
+
};
|
|
37
26
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
var updatedTablePos = {};
|
|
28
|
+
if (pluginState.tablePos) {
|
|
29
|
+
var _tr$mapping$mapResult2 = tr.mapping.mapResult(pluginState.tablePos, -1),
|
|
30
|
+
_pos = _tr$mapping$mapResult2.pos,
|
|
31
|
+
_deleted = _tr$mapping$mapResult2.deleted;
|
|
32
|
+
updatedTablePos = {
|
|
33
|
+
tablePos: _deleted ? undefined : _pos
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return _objectSpread(_objectSpread(_objectSpread({}, pluginState), updatedTargetCell), updatedTablePos);
|
|
37
|
+
}
|
|
38
|
+
return pluginState;
|
|
39
|
+
},
|
|
40
|
+
onDocChanged: _handlers.handleDocOrSelectionChanged,
|
|
41
|
+
onSelectionChanged: _handlers.handleDocOrSelectionChanged
|
|
42
|
+
});
|
|
43
|
+
var createPluginState = exports.createPluginState = dest.createPluginState;
|
|
44
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
45
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
@@ -32,20 +32,20 @@ var reducer = function reducer(pluginState, action) {
|
|
|
32
32
|
}
|
|
33
33
|
return pluginState;
|
|
34
34
|
};
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
return pluginState;
|
|
35
|
+
var dest = (0, _utils.pluginFactory)(_pluginKey.pluginKey, reducer, {
|
|
36
|
+
mapping: function mapping(tr, pluginState) {
|
|
37
|
+
if (tr.docChanged) {
|
|
38
|
+
return pluginState.map(function (rowInfo) {
|
|
39
|
+
var remapped = tr.mapping.mapResult(rowInfo.pos);
|
|
40
|
+
return remapped ? _objectSpread(_objectSpread({}, rowInfo), {}, {
|
|
41
|
+
pos: remapped.pos
|
|
42
|
+
}) : undefined;
|
|
43
|
+
}).filter(function (f) {
|
|
44
|
+
return f !== undefined;
|
|
45
|
+
});
|
|
48
46
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
return pluginState;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
var createPluginState = exports.createPluginState = dest.createPluginState;
|
|
51
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { pluginKey } from './plugin-key';
|
|
3
3
|
import { reducer } from './reducer';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = pluginFactory(pluginKey, reducer);
|
|
4
|
+
const dest = pluginFactory(pluginKey, reducer);
|
|
5
|
+
export const createPluginState = dest.createPluginState;
|
|
6
|
+
export const createCommand = dest.createCommand;
|
|
7
|
+
export const getPluginState = dest.getPluginState;
|
|
@@ -2,11 +2,7 @@ import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
|
2
2
|
import { pluginKey as tablePluginKey } from '../plugin-key';
|
|
3
3
|
import { pluginKey } from './plugin-key';
|
|
4
4
|
import reducer from './reducer';
|
|
5
|
-
|
|
6
|
-
createPluginState,
|
|
7
|
-
createCommand,
|
|
8
|
-
getPluginState
|
|
9
|
-
} = pluginFactory(pluginKey, reducer, {
|
|
5
|
+
const dest = pluginFactory(pluginKey, reducer, {
|
|
10
6
|
mapping: (tr, pluginState) => {
|
|
11
7
|
if (tr.docChanged) {
|
|
12
8
|
let decorationSet = pluginState.decorationSet;
|
|
@@ -19,11 +15,12 @@ export const {
|
|
|
19
15
|
}
|
|
20
16
|
return {
|
|
21
17
|
...pluginState,
|
|
22
|
-
|
|
23
|
-
decorationSet
|
|
24
|
-
}
|
|
18
|
+
decorationSet
|
|
25
19
|
};
|
|
26
20
|
}
|
|
27
21
|
return pluginState;
|
|
28
22
|
}
|
|
29
|
-
});
|
|
23
|
+
});
|
|
24
|
+
export const createPluginState = dest.createPluginState;
|
|
25
|
+
export const createCommand = dest.createCommand;
|
|
26
|
+
export const getPluginState = dest.getPluginState;
|
|
@@ -2,11 +2,7 @@ import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
|
2
2
|
import { handleDocOrSelectionChanged } from './handlers';
|
|
3
3
|
import { pluginKey } from './plugin-key';
|
|
4
4
|
import reducer from './reducer';
|
|
5
|
-
|
|
6
|
-
createPluginState,
|
|
7
|
-
createCommand,
|
|
8
|
-
getPluginState
|
|
9
|
-
} = pluginFactory(pluginKey, reducer, {
|
|
5
|
+
const dest = pluginFactory(pluginKey, reducer, {
|
|
10
6
|
mapping: (tr, pluginState) => {
|
|
11
7
|
if (tr.docChanged) {
|
|
12
8
|
let updatedTargetCell = {};
|
|
@@ -39,4 +35,7 @@ export const {
|
|
|
39
35
|
},
|
|
40
36
|
onDocChanged: handleDocOrSelectionChanged,
|
|
41
37
|
onSelectionChanged: handleDocOrSelectionChanged
|
|
42
|
-
});
|
|
38
|
+
});
|
|
39
|
+
export const createPluginState = dest.createPluginState;
|
|
40
|
+
export const createCommand = dest.createCommand;
|
|
41
|
+
export const getPluginState = dest.getPluginState;
|
|
@@ -20,10 +20,7 @@ const reducer = (pluginState, action) => {
|
|
|
20
20
|
}
|
|
21
21
|
return pluginState;
|
|
22
22
|
};
|
|
23
|
-
const {
|
|
24
|
-
createPluginState,
|
|
25
|
-
createCommand
|
|
26
|
-
} = pluginFactory(pluginKey, reducer, {
|
|
23
|
+
const dest = pluginFactory(pluginKey, reducer, {
|
|
27
24
|
mapping: (tr, pluginState) => {
|
|
28
25
|
if (tr.docChanged) {
|
|
29
26
|
return pluginState.map(rowInfo => {
|
|
@@ -37,4 +34,6 @@ const {
|
|
|
37
34
|
return pluginState;
|
|
38
35
|
}
|
|
39
36
|
});
|
|
37
|
+
const createPluginState = dest.createPluginState;
|
|
38
|
+
const createCommand = dest.createCommand;
|
|
40
39
|
export { createPluginState, createCommand };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { pluginKey } from './plugin-key';
|
|
3
3
|
import { reducer } from './reducer';
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { createPluginState, createCommand, getPluginState };
|
|
4
|
+
var dest = pluginFactory(pluginKey, reducer);
|
|
5
|
+
export var createPluginState = dest.createPluginState;
|
|
6
|
+
export var createCommand = dest.createCommand;
|
|
7
|
+
export var getPluginState = dest.getPluginState;
|
|
@@ -5,25 +5,24 @@ import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
|
5
5
|
import { pluginKey as tablePluginKey } from '../plugin-key';
|
|
6
6
|
import { pluginKey } from './plugin-key';
|
|
7
7
|
import reducer from './reducer';
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
if (decorationSet) {
|
|
17
|
-
decorationSet = decorationSet.map(tr.mapping, tr.doc);
|
|
18
|
-
}
|
|
19
|
-
return _objectSpread(_objectSpread({}, pluginState), {
|
|
20
|
-
decorationSet: decorationSet
|
|
21
|
-
});
|
|
8
|
+
var dest = pluginFactory(pluginKey, reducer, {
|
|
9
|
+
mapping: function mapping(tr, pluginState) {
|
|
10
|
+
if (tr.docChanged) {
|
|
11
|
+
var decorationSet = pluginState.decorationSet;
|
|
12
|
+
var meta = tr.getMeta(tablePluginKey);
|
|
13
|
+
if (meta && meta.data && meta.data.decorationSet) {
|
|
14
|
+
decorationSet = meta.data.decorationSet;
|
|
22
15
|
}
|
|
23
|
-
|
|
16
|
+
if (decorationSet) {
|
|
17
|
+
decorationSet = decorationSet.map(tr.mapping, tr.doc);
|
|
18
|
+
}
|
|
19
|
+
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
20
|
+
decorationSet: decorationSet
|
|
21
|
+
});
|
|
24
22
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export
|
|
23
|
+
return pluginState;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export var createPluginState = dest.createPluginState;
|
|
27
|
+
export var createCommand = dest.createCommand;
|
|
28
|
+
export var getPluginState = dest.getPluginState;
|
|
@@ -5,35 +5,34 @@ import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
|
5
5
|
import { handleDocOrSelectionChanged } from './handlers';
|
|
6
6
|
import { pluginKey } from './plugin-key';
|
|
7
7
|
import reducer from './reducer';
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
var updatedTablePos = {};
|
|
21
|
-
if (pluginState.tablePos) {
|
|
22
|
-
var _tr$mapping$mapResult2 = tr.mapping.mapResult(pluginState.tablePos, -1),
|
|
23
|
-
_pos = _tr$mapping$mapResult2.pos,
|
|
24
|
-
_deleted = _tr$mapping$mapResult2.deleted;
|
|
25
|
-
updatedTablePos = {
|
|
26
|
-
tablePos: _deleted ? undefined : _pos
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
return _objectSpread(_objectSpread(_objectSpread({}, pluginState), updatedTargetCell), updatedTablePos);
|
|
8
|
+
var dest = pluginFactory(pluginKey, reducer, {
|
|
9
|
+
mapping: function mapping(tr, pluginState) {
|
|
10
|
+
if (tr.docChanged) {
|
|
11
|
+
var updatedTargetCell = {};
|
|
12
|
+
if (pluginState.targetCellPosition) {
|
|
13
|
+
var _tr$mapping$mapResult = tr.mapping.mapResult(pluginState.targetCellPosition),
|
|
14
|
+
pos = _tr$mapping$mapResult.pos,
|
|
15
|
+
deleted = _tr$mapping$mapResult.deleted;
|
|
16
|
+
updatedTargetCell = {
|
|
17
|
+
targetCellPosition: deleted ? undefined : pos
|
|
18
|
+
};
|
|
30
19
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
var updatedTablePos = {};
|
|
21
|
+
if (pluginState.tablePos) {
|
|
22
|
+
var _tr$mapping$mapResult2 = tr.mapping.mapResult(pluginState.tablePos, -1),
|
|
23
|
+
_pos = _tr$mapping$mapResult2.pos,
|
|
24
|
+
_deleted = _tr$mapping$mapResult2.deleted;
|
|
25
|
+
updatedTablePos = {
|
|
26
|
+
tablePos: _deleted ? undefined : _pos
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return _objectSpread(_objectSpread(_objectSpread({}, pluginState), updatedTargetCell), updatedTablePos);
|
|
30
|
+
}
|
|
31
|
+
return pluginState;
|
|
32
|
+
},
|
|
33
|
+
onDocChanged: handleDocOrSelectionChanged,
|
|
34
|
+
onSelectionChanged: handleDocOrSelectionChanged
|
|
35
|
+
});
|
|
36
|
+
export var createPluginState = dest.createPluginState;
|
|
37
|
+
export var createCommand = dest.createCommand;
|
|
38
|
+
export var getPluginState = dest.getPluginState;
|
|
@@ -25,21 +25,21 @@ var reducer = function reducer(pluginState, action) {
|
|
|
25
25
|
}
|
|
26
26
|
return pluginState;
|
|
27
27
|
};
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
return pluginState;
|
|
28
|
+
var dest = pluginFactory(pluginKey, reducer, {
|
|
29
|
+
mapping: function mapping(tr, pluginState) {
|
|
30
|
+
if (tr.docChanged) {
|
|
31
|
+
return pluginState.map(function (rowInfo) {
|
|
32
|
+
var remapped = tr.mapping.mapResult(rowInfo.pos);
|
|
33
|
+
return remapped ? _objectSpread(_objectSpread({}, rowInfo), {}, {
|
|
34
|
+
pos: remapped.pos
|
|
35
|
+
}) : undefined;
|
|
36
|
+
}).filter(function (f) {
|
|
37
|
+
return f !== undefined;
|
|
38
|
+
});
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
return pluginState;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
var createPluginState = dest.createPluginState;
|
|
44
|
+
var createCommand = dest.createCommand;
|
|
45
45
|
export { createPluginState, createCommand };
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { AnalyticPluginAction } from './actions';
|
|
5
|
+
import type { AnalyticPluginState } from './types';
|
|
6
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: AnalyticPluginState | ((state: EditorState) => AnalyticPluginState)) => SafeStateField<AnalyticPluginState>;
|
|
7
|
+
export declare const createCommand: <A = AnalyticPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
+
export declare const getPluginState: (state: EditorState) => AnalyticPluginState;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { DragAndDropPluginAction } from './actions';
|
|
5
|
+
import type { DragAndDropPluginState } from './types';
|
|
6
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: DragAndDropPluginState | ((state: EditorState) => DragAndDropPluginState)) => SafeStateField<DragAndDropPluginState>;
|
|
7
|
+
export declare const createCommand: <A = DragAndDropPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
+
export declare const getPluginState: (state: EditorState) => DragAndDropPluginState;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { TablePluginState, TablePluginAction } from '../types';
|
|
5
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: TablePluginState | ((state: EditorState) => TablePluginState)) => SafeStateField<TablePluginState>;
|
|
6
|
+
export declare const createCommand: <A = TablePluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
7
|
+
export declare const getPluginState: (state: EditorState) => TablePluginState;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
4
|
import type { StickyPluginAction, StickyPluginState } from './types';
|
|
2
|
-
declare const createPluginState: (dispatch:
|
|
5
|
+
declare const createPluginState: (dispatch: Dispatch, initialState: StickyPluginState | ((state: EditorState) => StickyPluginState)) => SafeStateField<StickyPluginState>;
|
|
6
|
+
declare const createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
3
7
|
export { createPluginState, createCommand };
|
|
@@ -5,7 +5,5 @@ type TableWidthInCommentFixPluginState = {
|
|
|
5
5
|
documentHasLoadedOnce: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare const pluginKey: PluginKey<TableWidthInCommentFixPluginState>;
|
|
8
|
-
declare const createPlugin: (dispatch: Dispatch, isTableAlignmentEnabled: boolean) => SafePlugin<
|
|
9
|
-
documentHasLoadedOnce: boolean;
|
|
10
|
-
}>;
|
|
8
|
+
declare const createPlugin: (dispatch: Dispatch, isTableAlignmentEnabled: boolean) => SafePlugin<TableWidthInCommentFixPluginState>;
|
|
11
9
|
export { createPlugin };
|
|
@@ -13,9 +13,5 @@ type TableWidthPluginState = {
|
|
|
13
13
|
tableRef: HTMLTableElement | null;
|
|
14
14
|
};
|
|
15
15
|
export declare const pluginKey: PluginKey<TableWidthPluginState>;
|
|
16
|
-
declare const createPlugin: (dispatch: Dispatch, dispatchAnalyticsEvent: DispatchAnalyticsEvent, fullWidthEnabled: boolean, maxWidthEnabled: boolean, isTableScalingEnabled: boolean, isTableAlignmentEnabled: boolean, isCommentEditor: boolean) => SafePlugin<
|
|
17
|
-
resizing: boolean;
|
|
18
|
-
tableLocalId: string;
|
|
19
|
-
tableRef: null;
|
|
20
|
-
}>;
|
|
16
|
+
declare const createPlugin: (dispatch: Dispatch, dispatchAnalyticsEvent: DispatchAnalyticsEvent, fullWidthEnabled: boolean, maxWidthEnabled: boolean, isTableScalingEnabled: boolean, isTableAlignmentEnabled: boolean, isCommentEditor: boolean) => SafePlugin<TableWidthPluginState>;
|
|
21
17
|
export { createPlugin };
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
8
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
10
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
10
11
|
import type tablePlugin from '../../tablePlugin';
|
|
12
|
+
import type { TableSortMeta } from './types';
|
|
11
13
|
export declare const createPlugin: (api: ExtractInjectionAPI<typeof tablePlugin>, nodeViewPortalProviderAPI: PortalProviderAPI) => SafePlugin<{
|
|
14
|
+
allTables: [string, Node, number][];
|
|
12
15
|
decorations: DecorationSet;
|
|
13
|
-
|
|
14
|
-
sort: import("./types").TableSortMeta;
|
|
16
|
+
sort: TableSortMeta;
|
|
15
17
|
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,4 +17,4 @@ export interface Props {
|
|
|
18
17
|
tableWrapper?: HTMLElement;
|
|
19
18
|
targetCellPosition: number;
|
|
20
19
|
}
|
|
21
|
-
export default function (props: Props):
|
|
20
|
+
export default function (props: Props): JSX.Element;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
2
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -24,7 +19,7 @@ interface Props {
|
|
|
24
19
|
targetCellPosition?: number;
|
|
25
20
|
}
|
|
26
21
|
declare const FloatingContextualMenu: {
|
|
27
|
-
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, editorAnalyticsAPI, getEditorContainerWidth, getEditorFeatureFlags, isCellMenuOpenByKeyboard, isCommentEditor, api, isDragMenuOpen, }: Props):
|
|
22
|
+
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, editorAnalyticsAPI, getEditorContainerWidth, getEditorFeatureFlags, isCellMenuOpenByKeyboard, isCommentEditor, api, isDragMenuOpen, }: Props): JSX.Element | null;
|
|
28
23
|
displayName: string;
|
|
29
24
|
};
|
|
30
25
|
export default FloatingContextualMenu;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { AnalyticPluginAction } from './actions';
|
|
5
|
+
import type { AnalyticPluginState } from './types';
|
|
6
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: AnalyticPluginState | ((state: EditorState) => AnalyticPluginState)) => SafeStateField<AnalyticPluginState>;
|
|
7
|
+
export declare const createCommand: <A = AnalyticPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
+
export declare const getPluginState: (state: EditorState) => AnalyticPluginState;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { DragAndDropPluginAction } from './actions';
|
|
5
|
+
import type { DragAndDropPluginState } from './types';
|
|
6
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: DragAndDropPluginState | ((state: EditorState) => DragAndDropPluginState)) => SafeStateField<DragAndDropPluginState>;
|
|
7
|
+
export declare const createCommand: <A = DragAndDropPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
+
export declare const getPluginState: (state: EditorState) => DragAndDropPluginState;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { TablePluginState, TablePluginAction } from '../types';
|
|
5
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: TablePluginState | ((state: EditorState) => TablePluginState)) => SafeStateField<TablePluginState>;
|
|
6
|
+
export declare const createCommand: <A = TablePluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
7
|
+
export declare const getPluginState: (state: EditorState) => TablePluginState;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
4
|
import type { StickyPluginAction, StickyPluginState } from './types';
|
|
2
|
-
declare const createPluginState: (dispatch:
|
|
5
|
+
declare const createPluginState: (dispatch: Dispatch, initialState: StickyPluginState | ((state: EditorState) => StickyPluginState)) => SafeStateField<StickyPluginState>;
|
|
6
|
+
declare const createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
3
7
|
export { createPluginState, createCommand };
|
|
@@ -5,7 +5,5 @@ type TableWidthInCommentFixPluginState = {
|
|
|
5
5
|
documentHasLoadedOnce: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare const pluginKey: PluginKey<TableWidthInCommentFixPluginState>;
|
|
8
|
-
declare const createPlugin: (dispatch: Dispatch, isTableAlignmentEnabled: boolean) => SafePlugin<
|
|
9
|
-
documentHasLoadedOnce: boolean;
|
|
10
|
-
}>;
|
|
8
|
+
declare const createPlugin: (dispatch: Dispatch, isTableAlignmentEnabled: boolean) => SafePlugin<TableWidthInCommentFixPluginState>;
|
|
11
9
|
export { createPlugin };
|
|
@@ -13,9 +13,5 @@ type TableWidthPluginState = {
|
|
|
13
13
|
tableRef: HTMLTableElement | null;
|
|
14
14
|
};
|
|
15
15
|
export declare const pluginKey: PluginKey<TableWidthPluginState>;
|
|
16
|
-
declare const createPlugin: (dispatch: Dispatch, dispatchAnalyticsEvent: DispatchAnalyticsEvent, fullWidthEnabled: boolean, maxWidthEnabled: boolean, isTableScalingEnabled: boolean, isTableAlignmentEnabled: boolean, isCommentEditor: boolean) => SafePlugin<
|
|
17
|
-
resizing: boolean;
|
|
18
|
-
tableLocalId: string;
|
|
19
|
-
tableRef: null;
|
|
20
|
-
}>;
|
|
16
|
+
declare const createPlugin: (dispatch: Dispatch, dispatchAnalyticsEvent: DispatchAnalyticsEvent, fullWidthEnabled: boolean, maxWidthEnabled: boolean, isTableScalingEnabled: boolean, isTableAlignmentEnabled: boolean, isCommentEditor: boolean) => SafePlugin<TableWidthPluginState>;
|
|
21
17
|
export { createPlugin };
|
|
@@ -6,14 +6,16 @@
|
|
|
6
6
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
8
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
10
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
10
11
|
import type tablePlugin from '../../tablePlugin';
|
|
12
|
+
import type { TableSortMeta } from './types';
|
|
11
13
|
export declare const createPlugin: (api: ExtractInjectionAPI<typeof tablePlugin>, nodeViewPortalProviderAPI: PortalProviderAPI) => SafePlugin<{
|
|
12
|
-
decorations: DecorationSet;
|
|
13
14
|
allTables: [
|
|
14
15
|
string,
|
|
15
|
-
|
|
16
|
+
Node,
|
|
16
17
|
number
|
|
17
18
|
][];
|
|
18
|
-
|
|
19
|
+
decorations: DecorationSet;
|
|
20
|
+
sort: TableSortMeta;
|
|
19
21
|
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,4 +17,4 @@ export interface Props {
|
|
|
18
17
|
tableWrapper?: HTMLElement;
|
|
19
18
|
targetCellPosition: number;
|
|
20
19
|
}
|
|
21
|
-
export default function (props: Props):
|
|
20
|
+
export default function (props: Props): JSX.Element;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
2
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -24,7 +19,7 @@ interface Props {
|
|
|
24
19
|
targetCellPosition?: number;
|
|
25
20
|
}
|
|
26
21
|
declare const FloatingContextualMenu: {
|
|
27
|
-
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, editorAnalyticsAPI, getEditorContainerWidth, getEditorFeatureFlags, isCellMenuOpenByKeyboard, isCommentEditor, api, isDragMenuOpen, }: Props):
|
|
22
|
+
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, editorAnalyticsAPI, getEditorContainerWidth, getEditorFeatureFlags, isCellMenuOpenByKeyboard, isCommentEditor, api, isDragMenuOpen, }: Props): JSX.Element | null;
|
|
28
23
|
displayName: string;
|
|
29
24
|
};
|
|
30
25
|
export default FloatingContextualMenu;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.9",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^10.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^10.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^12.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "13.1.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "13.1.5",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^10.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^19.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^7.1.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
57
57
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
58
58
|
"@atlaskit/primitives": "^19.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^71.0.0",
|
|
60
60
|
"@atlaskit/toggle": "^15.6.0",
|
|
61
61
|
"@atlaskit/tokens": "^13.0.0",
|
|
62
62
|
"@atlaskit/tooltip": "^21.2.0",
|