@atlaskit/editor-plugin-table 0.2.3 → 0.2.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/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/dist/types/plugins/table/ui/FloatingContextualButton/styles.d.ts +2 -2
- package/dist/types/plugins/table/ui/FloatingContextualMenu/styles.d.ts +2 -2
- package/dist/types/plugins/table/ui/common-styles.d.ts +3 -3
- package/dist/types/plugins/table/ui/ui-styles.d.ts +14 -14
- package/package.json +1 -1
- package/src/plugins/table/event-handlers.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 0.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`49588ece345`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49588ece345) - Fixed regression where resize line would not show up for selected cell
|
|
8
|
+
|
|
3
9
|
## 0.2.3
|
|
4
10
|
|
|
5
11
|
### 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
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
|
-
export declare const tableFloatingCellButtonStyles: (props: ThemeProps) => import("@emotion/
|
|
3
|
-
export declare const tableFloatingCellButtonSelectedStyles: (props: ThemeProps) => import("@emotion/
|
|
2
|
+
export declare const tableFloatingCellButtonStyles: (props: ThemeProps) => import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const tableFloatingCellButtonSelectedStyles: (props: ThemeProps) => import("@emotion/utils").SerializedStyles;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const cellColourPreviewStyles: (selectedColor: string) => import("@emotion/
|
|
2
|
-
export declare const tablePopupStyles: import("@emotion/
|
|
1
|
+
export declare const cellColourPreviewStyles: (selectedColor: string) => import("@emotion/utils").SerializedStyles;
|
|
2
|
+
export declare const tablePopupStyles: import("@emotion/utils").SerializedStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
|
-
export declare const tableStyles: (props: ThemeProps) => import("@emotion/
|
|
3
|
-
export declare const tableFullPageEditorStyles: import("@emotion/
|
|
4
|
-
export declare const tableCommentEditorStyles: import("@emotion/
|
|
2
|
+
export declare const tableStyles: (props: ThemeProps) => import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const tableFullPageEditorStyles: import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const tableCommentEditorStyles: import("@emotion/utils").SerializedStyles;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
|
-
export declare const InsertMarker: (props: ThemeProps, cssString?: string | undefined) => import("@emotion/
|
|
3
|
-
export declare const HeaderButton: (props: ThemeProps, cssString?: string | undefined) => import("@emotion/
|
|
4
|
-
export declare const HeaderButtonHover: () => import("@emotion/
|
|
5
|
-
export declare const HeaderButtonDanger: () => import("@emotion/
|
|
6
|
-
export declare const insertColumnButtonWrapper: import("@emotion/
|
|
7
|
-
export declare const insertRowButtonWrapper: import("@emotion/
|
|
8
|
-
export declare const columnControlsLineMarker: (props: ThemeProps) => import("@emotion/
|
|
9
|
-
export declare const DeleteButton: import("@emotion/
|
|
10
|
-
export declare const OverflowShadow: (props: ThemeProps) => import("@emotion/
|
|
11
|
-
export declare const columnControlsDecoration: (props: ThemeProps) => import("@emotion/
|
|
12
|
-
export declare const hoveredDeleteButton: import("@emotion/
|
|
13
|
-
export declare const hoveredCell: import("@emotion/
|
|
14
|
-
export declare const hoveredWarningCell: import("@emotion/
|
|
15
|
-
export declare const resizeHandle: import("@emotion/
|
|
2
|
+
export declare const InsertMarker: (props: ThemeProps, cssString?: string | undefined) => import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const HeaderButton: (props: ThemeProps, cssString?: string | undefined) => import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const HeaderButtonHover: () => import("@emotion/utils").SerializedStyles;
|
|
5
|
+
export declare const HeaderButtonDanger: () => import("@emotion/utils").SerializedStyles;
|
|
6
|
+
export declare const insertColumnButtonWrapper: import("@emotion/utils").SerializedStyles;
|
|
7
|
+
export declare const insertRowButtonWrapper: import("@emotion/utils").SerializedStyles;
|
|
8
|
+
export declare const columnControlsLineMarker: (props: ThemeProps) => import("@emotion/utils").SerializedStyles;
|
|
9
|
+
export declare const DeleteButton: import("@emotion/utils").SerializedStyles;
|
|
10
|
+
export declare const OverflowShadow: (props: ThemeProps) => import("@emotion/utils").SerializedStyles;
|
|
11
|
+
export declare const columnControlsDecoration: (props: ThemeProps) => import("@emotion/utils").SerializedStyles;
|
|
12
|
+
export declare const hoveredDeleteButton: import("@emotion/utils").SerializedStyles;
|
|
13
|
+
export declare const hoveredCell: import("@emotion/utils").SerializedStyles;
|
|
14
|
+
export declare const hoveredWarningCell: import("@emotion/utils").SerializedStyles;
|
|
15
|
+
export declare const resizeHandle: import("@emotion/utils").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -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,
|