@atlaskit/editor-plugin-table 10.3.1 → 10.3.3
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 +18 -0
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +1 -1
- package/dist/cjs/pm-plugins/commands/selection.js +4 -2
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +1 -1
- package/dist/es2019/pm-plugins/commands/selection.js +8 -2
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +1 -1
- package/dist/esm/pm-plugins/commands/selection.js +4 -2
- package/package.json +5 -5
- package/src/nodeviews/TableComponentWithSharedState.tsx +1 -1
- package/src/pm-plugins/commands/selection.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 10.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#123345](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/123345)
|
|
8
|
+
[`31b02e82858e5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/31b02e82858e5) -
|
|
9
|
+
NO-ISSUE: Update usages of selection utils
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 10.3.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#122372](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/122372)
|
|
17
|
+
[`888a32882ccad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/888a32882ccad) -
|
|
18
|
+
[ED-26327] Disable corner control on live page view mode
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 10.3.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -79,7 +79,7 @@ var TableComponentWithSharedState = exports.TableComponentWithSharedState = func
|
|
|
79
79
|
isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
|
|
80
80
|
allowTableAlignment: allowTableAlignment,
|
|
81
81
|
allowTableResizing: allowTableResizing,
|
|
82
|
-
tableActive: tableActive,
|
|
82
|
+
tableActive: tableActive && !isLivePageViewMode,
|
|
83
83
|
ordering: ordering,
|
|
84
84
|
isResizing: isResizing,
|
|
85
85
|
getNode: getNode
|
|
@@ -415,10 +415,12 @@ var setGapCursorAfterTable = function setGapCursorAfterTable(editorSelectionAPI)
|
|
|
415
415
|
};
|
|
416
416
|
};
|
|
417
417
|
var isSelectionAtStartOfTable = function isSelectionAtStartOfTable($pos, selection) {
|
|
418
|
-
|
|
418
|
+
var _findTable;
|
|
419
|
+
return (0, _selection.isSelectionAtStartOfNode)($pos, (_findTable = (0, _utils.findTable)(selection)) === null || _findTable === void 0 ? void 0 : _findTable.node);
|
|
419
420
|
};
|
|
420
421
|
var isSelectionAtEndOfTable = function isSelectionAtEndOfTable($pos, selection) {
|
|
421
|
-
|
|
422
|
+
var _findTable2;
|
|
423
|
+
return (0, _selection.isSelectionAtEndOfNode)($pos, (_findTable2 = (0, _utils.findTable)(selection)) === null || _findTable2 === void 0 ? void 0 : _findTable2.node);
|
|
422
424
|
};
|
|
423
425
|
var shiftArrowUpFromTable = exports.shiftArrowUpFromTable = function shiftArrowUpFromTable(editorSelectionAPI) {
|
|
424
426
|
return function () {
|
|
@@ -76,7 +76,7 @@ export const TableComponentWithSharedState = ({
|
|
|
76
76
|
isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
|
|
77
77
|
allowTableAlignment: allowTableAlignment,
|
|
78
78
|
allowTableResizing: allowTableResizing,
|
|
79
|
-
tableActive: tableActive,
|
|
79
|
+
tableActive: tableActive && !isLivePageViewMode,
|
|
80
80
|
ordering: ordering,
|
|
81
81
|
isResizing: isResizing,
|
|
82
82
|
getNode: getNode
|
|
@@ -373,8 +373,14 @@ const setGapCursorAfterTable = editorSelectionAPI => () => (state, dispatch) =>
|
|
|
373
373
|
}
|
|
374
374
|
return false;
|
|
375
375
|
};
|
|
376
|
-
const isSelectionAtStartOfTable = ($pos, selection) =>
|
|
377
|
-
|
|
376
|
+
const isSelectionAtStartOfTable = ($pos, selection) => {
|
|
377
|
+
var _findTable;
|
|
378
|
+
return isSelectionAtStartOfNode($pos, (_findTable = findTable(selection)) === null || _findTable === void 0 ? void 0 : _findTable.node);
|
|
379
|
+
};
|
|
380
|
+
const isSelectionAtEndOfTable = ($pos, selection) => {
|
|
381
|
+
var _findTable2;
|
|
382
|
+
return isSelectionAtEndOfNode($pos, (_findTable2 = findTable(selection)) === null || _findTable2 === void 0 ? void 0 : _findTable2.node);
|
|
383
|
+
};
|
|
378
384
|
export const shiftArrowUpFromTable = editorSelectionAPI => () => (state, dispatch) => {
|
|
379
385
|
const {
|
|
380
386
|
selection
|
|
@@ -73,7 +73,7 @@ export var TableComponentWithSharedState = function TableComponentWithSharedStat
|
|
|
73
73
|
isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
|
|
74
74
|
allowTableAlignment: allowTableAlignment,
|
|
75
75
|
allowTableResizing: allowTableResizing,
|
|
76
|
-
tableActive: tableActive,
|
|
76
|
+
tableActive: tableActive && !isLivePageViewMode,
|
|
77
77
|
ordering: ordering,
|
|
78
78
|
isResizing: isResizing,
|
|
79
79
|
getNode: getNode
|
|
@@ -409,10 +409,12 @@ var setGapCursorAfterTable = function setGapCursorAfterTable(editorSelectionAPI)
|
|
|
409
409
|
};
|
|
410
410
|
};
|
|
411
411
|
var isSelectionAtStartOfTable = function isSelectionAtStartOfTable($pos, selection) {
|
|
412
|
-
|
|
412
|
+
var _findTable;
|
|
413
|
+
return isSelectionAtStartOfNode($pos, (_findTable = findTable(selection)) === null || _findTable === void 0 ? void 0 : _findTable.node);
|
|
413
414
|
};
|
|
414
415
|
var isSelectionAtEndOfTable = function isSelectionAtEndOfTable($pos, selection) {
|
|
415
|
-
|
|
416
|
+
var _findTable2;
|
|
417
|
+
return isSelectionAtEndOfNode($pos, (_findTable2 = findTable(selection)) === null || _findTable2 === void 0 ? void 0 : _findTable2.node);
|
|
416
418
|
};
|
|
417
419
|
export var shiftArrowUpFromTable = function shiftArrowUpFromTable(editorSelectionAPI) {
|
|
418
420
|
return function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.3",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
33
33
|
"@atlaskit/button": "^21.1.0",
|
|
34
34
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
36
|
-
"@atlaskit/editor-palette": "2.0.0",
|
|
35
|
+
"@atlaskit/editor-common": "^102.0.0",
|
|
36
|
+
"@atlaskit/editor-palette": "^2.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.1.0",
|
|
39
|
-
"@atlaskit/editor-plugin-batch-attribute-updates": "2.1.
|
|
39
|
+
"@atlaskit/editor-plugin-batch-attribute-updates": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-content-insertion": "^2.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
54
54
|
"@atlaskit/primitives": "^14.1.0",
|
|
55
|
-
"@atlaskit/theme": "^
|
|
55
|
+
"@atlaskit/theme": "^18.0.0",
|
|
56
56
|
"@atlaskit/tmp-editor-statsig": "^3.4.0",
|
|
57
57
|
"@atlaskit/toggle": "^15.0.0",
|
|
58
58
|
"@atlaskit/tokens": "^4.3.0",
|
|
@@ -110,7 +110,7 @@ export const TableComponentWithSharedState = ({
|
|
|
110
110
|
isTableScalingEnabled={options?.isTableScalingEnabled}
|
|
111
111
|
allowTableAlignment={allowTableAlignment}
|
|
112
112
|
allowTableResizing={allowTableResizing}
|
|
113
|
-
tableActive={tableActive}
|
|
113
|
+
tableActive={tableActive && !isLivePageViewMode}
|
|
114
114
|
ordering={ordering}
|
|
115
115
|
isResizing={isResizing}
|
|
116
116
|
getNode={getNode}
|
|
@@ -483,10 +483,10 @@ const setGapCursorAfterTable =
|
|
|
483
483
|
};
|
|
484
484
|
|
|
485
485
|
const isSelectionAtStartOfTable = ($pos: ResolvedPos, selection: Selection) =>
|
|
486
|
-
isSelectionAtStartOfNode($pos, findTable(selection));
|
|
486
|
+
isSelectionAtStartOfNode($pos, findTable(selection)?.node);
|
|
487
487
|
|
|
488
488
|
const isSelectionAtEndOfTable = ($pos: ResolvedPos, selection: Selection) =>
|
|
489
|
-
isSelectionAtEndOfNode($pos, findTable(selection));
|
|
489
|
+
isSelectionAtEndOfNode($pos, findTable(selection)?.node);
|
|
490
490
|
|
|
491
491
|
export const shiftArrowUpFromTable =
|
|
492
492
|
(editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) =>
|