@atlaskit/editor-plugin-table 22.4.6 → 22.4.8
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 +17 -0
- package/dist/cjs/pm-plugins/utils/nodes.js +17 -2
- package/dist/cjs/ui/FloatingContextualButton/index.js +5 -0
- package/dist/cjs/ui/FloatingContextualMenu/CellMenuPopup.js +103 -0
- package/dist/cjs/ui/FloatingContextualMenu/index.js +13 -2
- package/dist/cjs/ui/TableMenu/cell/getCellMenuComponents.js +77 -0
- package/dist/cjs/ui/TableMenu/cell/items/MergeCellsItem.js +21 -0
- package/dist/cjs/ui/TableMenu/cell/items/SplitCellItem.js +21 -0
- package/dist/cjs/ui/TableMenu/cell/keys.js +40 -0
- package/dist/cjs/ui/TableMenu/column/items/MoveColumnRightItem.js +2 -6
- package/dist/cjs/ui/TableMenu/shared/TableMenu.js +2 -1
- package/dist/cjs/ui/TableMenu/shared/getSharedItems.js +28 -19
- package/dist/cjs/ui/TableMenu/shared/getTableMenuComponents.js +2 -1
- package/dist/es2019/pm-plugins/utils/nodes.js +11 -2
- package/dist/es2019/ui/FloatingContextualButton/index.js +5 -0
- package/dist/es2019/ui/FloatingContextualMenu/CellMenuPopup.js +99 -0
- package/dist/es2019/ui/FloatingContextualMenu/index.js +13 -3
- package/dist/es2019/ui/TableMenu/cell/getCellMenuComponents.js +61 -0
- package/dist/es2019/ui/TableMenu/cell/items/MergeCellsItem.js +15 -0
- package/dist/es2019/ui/TableMenu/cell/items/SplitCellItem.js +15 -0
- package/dist/es2019/ui/TableMenu/cell/keys.js +42 -0
- package/dist/es2019/ui/TableMenu/column/items/MoveColumnRightItem.js +3 -5
- package/dist/es2019/ui/TableMenu/shared/TableMenu.js +2 -1
- package/dist/es2019/ui/TableMenu/shared/getSharedItems.js +9 -0
- package/dist/es2019/ui/TableMenu/shared/getTableMenuComponents.js +2 -1
- package/dist/esm/pm-plugins/utils/nodes.js +17 -2
- package/dist/esm/ui/FloatingContextualButton/index.js +5 -0
- package/dist/esm/ui/FloatingContextualMenu/CellMenuPopup.js +95 -0
- package/dist/esm/ui/FloatingContextualMenu/index.js +13 -3
- package/dist/esm/ui/TableMenu/cell/getCellMenuComponents.js +71 -0
- package/dist/esm/ui/TableMenu/cell/items/MergeCellsItem.js +14 -0
- package/dist/esm/ui/TableMenu/cell/items/SplitCellItem.js +14 -0
- package/dist/esm/ui/TableMenu/cell/keys.js +34 -0
- package/dist/esm/ui/TableMenu/column/items/MoveColumnRightItem.js +3 -7
- package/dist/esm/ui/TableMenu/shared/TableMenu.js +2 -1
- package/dist/esm/ui/TableMenu/shared/getSharedItems.js +9 -0
- package/dist/esm/ui/TableMenu/shared/getTableMenuComponents.js +2 -1
- package/dist/types/pm-plugins/utils/nodes.d.ts +3 -1
- package/dist/types/ui/FloatingContextualMenu/CellMenuPopup.d.ts +12 -0
- package/dist/types/ui/TableMenu/cell/getCellMenuComponents.d.ts +9 -0
- package/dist/types/ui/TableMenu/cell/items/MergeCellsItem.d.ts +2 -0
- package/dist/types/ui/TableMenu/cell/items/SplitCellItem.d.ts +2 -0
- package/dist/types/ui/TableMenu/cell/keys.d.ts +9 -0
- package/dist/types-ts4.5/pm-plugins/utils/nodes.d.ts +3 -1
- package/dist/types-ts4.5/ui/FloatingContextualMenu/CellMenuPopup.d.ts +12 -0
- package/dist/types-ts4.5/ui/TableMenu/cell/getCellMenuComponents.d.ts +9 -0
- package/dist/types-ts4.5/ui/TableMenu/cell/items/MergeCellsItem.d.ts +2 -0
- package/dist/types-ts4.5/ui/TableMenu/cell/items/SplitCellItem.d.ts +2 -0
- package/dist/types-ts4.5/ui/TableMenu/cell/keys.d.ts +9 -0
- package/package.json +7 -7
|
@@ -20,7 +20,9 @@ export declare const isTableNestedUnderBodiedSyncBlock: (state: EditorState, tab
|
|
|
20
20
|
/**
|
|
21
21
|
* Check if a given node is a header row with this definition:
|
|
22
22
|
* - all children are tableHeader cells
|
|
23
|
-
* - no table cells have been
|
|
23
|
+
* - no table cells have been merged with other table row cells (rowspan > 1)
|
|
24
|
+
* - no table cells have been merged with other table column cells (colspan > 1),
|
|
25
|
+
* (colspan check gated behind platform_editor_fix_sticky_header_malfunction)
|
|
24
26
|
*
|
|
25
27
|
* @param node ProseMirror node
|
|
26
28
|
* @returns boolean if it meets definition
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { PluginInjectionAPI } from '../../types';
|
|
4
|
+
type CellMenuPopupProps = {
|
|
5
|
+
api: PluginInjectionAPI | undefined | null;
|
|
6
|
+
editorView: EditorView;
|
|
7
|
+
isCellMenuOpenByKeyboard?: boolean;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
targetCellRef: Node;
|
|
10
|
+
};
|
|
11
|
+
export declare const CellMenuPopup: ({ api, editorView, isCellMenuOpenByKeyboard, isOpen, targetCellRef, }: CellMenuPopupProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RegisterComponent } from '@atlaskit/editor-ui-control-model';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the RegisterComponent[] array defining the cell contextual menu surface.
|
|
4
|
+
*
|
|
5
|
+
* This is a **UI-only stub** — all items are always visible with no conditional
|
|
6
|
+
* logic and no wired actions. Functional behaviour (actions, conditional visibility)
|
|
7
|
+
* will be connected in follow-up tickets.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getCellMenuComponents: () => RegisterComponent[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MenuItemType, MenuSectionType, MenuType } from '@atlaskit/editor-ui-control-model';
|
|
2
|
+
export declare const CELL_MENU: MenuType;
|
|
3
|
+
export declare const CELL_ACTION_SECTION: MenuSectionType;
|
|
4
|
+
export declare const CELL_DANGER_SECTION: MenuSectionType;
|
|
5
|
+
export declare const CELL_MENU_SECTION_RANK: Record<string, number>;
|
|
6
|
+
export declare const MERGE_CELLS_ITEM: MenuItemType;
|
|
7
|
+
export declare const SPLIT_CELL_ITEM: MenuItemType;
|
|
8
|
+
export declare const CELL_ACTION_SECTION_RANK: Record<string, number>;
|
|
9
|
+
export declare const CELL_DANGER_SECTION_RANK: Record<string, number>;
|
|
@@ -20,7 +20,9 @@ export declare const isTableNestedUnderBodiedSyncBlock: (state: EditorState, tab
|
|
|
20
20
|
/**
|
|
21
21
|
* Check if a given node is a header row with this definition:
|
|
22
22
|
* - all children are tableHeader cells
|
|
23
|
-
* - no table cells have been
|
|
23
|
+
* - no table cells have been merged with other table row cells (rowspan > 1)
|
|
24
|
+
* - no table cells have been merged with other table column cells (colspan > 1),
|
|
25
|
+
* (colspan check gated behind platform_editor_fix_sticky_header_malfunction)
|
|
24
26
|
*
|
|
25
27
|
* @param node ProseMirror node
|
|
26
28
|
* @returns boolean if it meets definition
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { PluginInjectionAPI } from '../../types';
|
|
4
|
+
type CellMenuPopupProps = {
|
|
5
|
+
api: PluginInjectionAPI | undefined | null;
|
|
6
|
+
editorView: EditorView;
|
|
7
|
+
isCellMenuOpenByKeyboard?: boolean;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
targetCellRef: Node;
|
|
10
|
+
};
|
|
11
|
+
export declare const CellMenuPopup: ({ api, editorView, isCellMenuOpenByKeyboard, isOpen, targetCellRef, }: CellMenuPopupProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RegisterComponent } from '@atlaskit/editor-ui-control-model';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the RegisterComponent[] array defining the cell contextual menu surface.
|
|
4
|
+
*
|
|
5
|
+
* This is a **UI-only stub** — all items are always visible with no conditional
|
|
6
|
+
* logic and no wired actions. Functional behaviour (actions, conditional visibility)
|
|
7
|
+
* will be connected in follow-up tickets.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getCellMenuComponents: () => RegisterComponent[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MenuItemType, MenuSectionType, MenuType } from '@atlaskit/editor-ui-control-model';
|
|
2
|
+
export declare const CELL_MENU: MenuType;
|
|
3
|
+
export declare const CELL_ACTION_SECTION: MenuSectionType;
|
|
4
|
+
export declare const CELL_DANGER_SECTION: MenuSectionType;
|
|
5
|
+
export declare const CELL_MENU_SECTION_RANK: Record<string, number>;
|
|
6
|
+
export declare const MERGE_CELLS_ITEM: MenuItemType;
|
|
7
|
+
export declare const SPLIT_CELL_ITEM: MenuItemType;
|
|
8
|
+
export declare const CELL_ACTION_SECTION_RANK: Record<string, number>;
|
|
9
|
+
export declare const CELL_DANGER_SECTION_RANK: Record<string, number>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "22.4.
|
|
3
|
+
"version": "22.4.8",
|
|
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
|
"singleton": true
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^52.
|
|
31
|
+
"@atlaskit/adf-schema": "^52.12.0",
|
|
32
32
|
"@atlaskit/button": "^23.11.0",
|
|
33
33
|
"@atlaskit/custom-steps": "^0.17.0",
|
|
34
34
|
"@atlaskit/editor-palette": "^2.2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^10.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^10.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^12.1.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "13.5.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "13.5.3",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^10.1.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^19.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^7.2.0",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
50
50
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
51
51
|
"@atlaskit/editor-tables": "^2.10.0",
|
|
52
|
-
"@atlaskit/editor-toolbar": "^1.
|
|
52
|
+
"@atlaskit/editor-toolbar": "^1.6.0",
|
|
53
53
|
"@atlaskit/editor-ui-control-model": "^1.2.0",
|
|
54
|
-
"@atlaskit/icon": "^
|
|
54
|
+
"@atlaskit/icon": "^35.0.0",
|
|
55
55
|
"@atlaskit/insm": "^0.4.0",
|
|
56
56
|
"@atlaskit/menu": "^8.5.0",
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
60
60
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
61
61
|
"@atlaskit/primitives": "^19.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^81.
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^81.1.0",
|
|
63
63
|
"@atlaskit/toggle": "^15.6.0",
|
|
64
64
|
"@atlaskit/tokens": "^13.0.0",
|
|
65
65
|
"@atlaskit/tooltip": "^22.2.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"uuid": "^3.1.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@atlaskit/editor-common": "^114.
|
|
77
|
+
"@atlaskit/editor-common": "^114.35.0",
|
|
78
78
|
"react": "^18.2.0",
|
|
79
79
|
"react-dom": "^18.2.0",
|
|
80
80
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|