@atlaskit/editor-plugin-table 0.2.3 → 0.2.5
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 +12 -0
- package/dist/cjs/plugins/table/event-handlers.js +4 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/event-handlers.js +5 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/event-handlers.js +5 -2
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
- package/src/plugins/table/event-handlers.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 0.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.2.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`49588ece345`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49588ece345) - Fixed regression where resize line would not show up for selected cell
|
|
14
|
+
|
|
3
15
|
## 0.2.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -318,7 +318,10 @@ var handleMouseMove = function handleMouseMove(getEditorFeatureFlags) {
|
|
|
318
318
|
var columnEndIndexTarget = positionColumn === 'left' ? rect.left : rect.right;
|
|
319
319
|
var rowIndexTarget = rect.top;
|
|
320
320
|
|
|
321
|
-
if (columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex)
|
|
321
|
+
if (columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex || !(0, _utils3.hasResizeHandler)({
|
|
322
|
+
target: element,
|
|
323
|
+
columnEndIndexTarget: columnEndIndexTarget
|
|
324
|
+
})) {
|
|
322
325
|
return (0, _commands.addResizeHandleDecorations)(rowIndexTarget, columnEndIndexTarget)(_state4, _dispatch5);
|
|
323
326
|
}
|
|
324
327
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -11,7 +11,7 @@ import { getPluginState } from './pm-plugins/plugin-factory';
|
|
|
11
11
|
import { getPluginState as getResizePluginState } from './pm-plugins/table-resizing/plugin-factory';
|
|
12
12
|
import { deleteColumns, deleteRows } from './transforms';
|
|
13
13
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from './types';
|
|
14
|
-
import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton, isTableControlsButton, isTableContainerOrWrapper } from './utils';
|
|
14
|
+
import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton, isTableControlsButton, isTableContainerOrWrapper, hasResizeHandler } from './utils';
|
|
15
15
|
import { getAllowAddColumnCustomStep } from './utils/get-allow-add-column-custom-step';
|
|
16
16
|
|
|
17
17
|
const isFocusingCalendar = event => event instanceof FocusEvent && event.relatedTarget instanceof HTMLElement && event.relatedTarget.getAttribute('aria-label') === 'calendar';
|
|
@@ -272,7 +272,10 @@ export const handleMouseMove = getEditorFeatureFlags => (view, event, elementCon
|
|
|
272
272
|
const columnEndIndexTarget = positionColumn === 'left' ? rect.left : rect.right;
|
|
273
273
|
const rowIndexTarget = rect.top;
|
|
274
274
|
|
|
275
|
-
if (columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex
|
|
275
|
+
if (columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex || !hasResizeHandler({
|
|
276
|
+
target: element,
|
|
277
|
+
columnEndIndexTarget
|
|
278
|
+
})) {
|
|
276
279
|
return addResizeHandleDecorations(rowIndexTarget, columnEndIndexTarget)(state, dispatch);
|
|
277
280
|
}
|
|
278
281
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -12,7 +12,7 @@ import { getPluginState } from './pm-plugins/plugin-factory';
|
|
|
12
12
|
import { getPluginState as getResizePluginState } from './pm-plugins/table-resizing/plugin-factory';
|
|
13
13
|
import { deleteColumns, deleteRows } from './transforms';
|
|
14
14
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from './types';
|
|
15
|
-
import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton, isTableControlsButton, isTableContainerOrWrapper } from './utils';
|
|
15
|
+
import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton, isTableControlsButton, isTableContainerOrWrapper, hasResizeHandler } from './utils';
|
|
16
16
|
import { getAllowAddColumnCustomStep } from './utils/get-allow-add-column-custom-step';
|
|
17
17
|
|
|
18
18
|
var isFocusingCalendar = function isFocusingCalendar(event) {
|
|
@@ -274,7 +274,10 @@ export var handleMouseMove = function handleMouseMove(getEditorFeatureFlags) {
|
|
|
274
274
|
var columnEndIndexTarget = positionColumn === 'left' ? rect.left : rect.right;
|
|
275
275
|
var rowIndexTarget = rect.top;
|
|
276
276
|
|
|
277
|
-
if (columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex
|
|
277
|
+
if (columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex || !hasResizeHandler({
|
|
278
|
+
target: element,
|
|
279
|
+
columnEndIndexTarget: columnEndIndexTarget
|
|
280
|
+
})) {
|
|
278
281
|
return addResizeHandleDecorations(rowIndexTarget, columnEndIndexTarget)(_state4, _dispatch5);
|
|
279
282
|
}
|
|
280
283
|
}
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@atlaskit/editor-tables": "^2.2.0",
|
|
25
25
|
"@atlaskit/icon": "^21.11.0",
|
|
26
26
|
"@atlaskit/theme": "^12.1.0",
|
|
27
|
-
"@atlaskit/tokens": "^0.
|
|
27
|
+
"@atlaskit/tokens": "^0.12.0",
|
|
28
28
|
"@atlaskit/tooltip": "^17.6.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"@emotion/react": "^11.7.1",
|
|
@@ -63,6 +63,7 @@ import {
|
|
|
63
63
|
isRowControlsButton,
|
|
64
64
|
isTableControlsButton,
|
|
65
65
|
isTableContainerOrWrapper,
|
|
66
|
+
hasResizeHandler,
|
|
66
67
|
} from './utils';
|
|
67
68
|
import { getAllowAddColumnCustomStep } from './utils/get-allow-add-column-custom-step';
|
|
68
69
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
@@ -371,7 +372,8 @@ export const handleMouseMove =
|
|
|
371
372
|
|
|
372
373
|
if (
|
|
373
374
|
columnEndIndexTarget !== resizeHandleColumnIndex ||
|
|
374
|
-
rowIndexTarget !== resizeHandleRowIndex
|
|
375
|
+
rowIndexTarget !== resizeHandleRowIndex ||
|
|
376
|
+
!hasResizeHandler({ target: element, columnEndIndexTarget })
|
|
375
377
|
) {
|
|
376
378
|
return addResizeHandleDecorations(
|
|
377
379
|
rowIndexTarget,
|