@atlaskit/editor-plugin-table 7.16.18 → 7.17.0
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 +21 -0
- package/dist/cjs/commands/column-resize.js +4 -3
- package/dist/cjs/commands/delete.js +3 -2
- package/dist/cjs/commands/insert.js +12 -8
- package/dist/cjs/commands-with-analytics.js +10 -7
- package/dist/cjs/event-handlers.js +3 -2
- package/dist/cjs/nodeviews/TableComponent.js +32 -19
- package/dist/cjs/nodeviews/TableContainer.js +4 -0
- package/dist/cjs/nodeviews/TableResizer.js +3 -2
- package/dist/cjs/nodeviews/table.js +6 -4
- package/dist/cjs/plugin.js +9 -6
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +12 -13
- package/dist/cjs/pm-plugins/keymap.js +11 -9
- package/dist/cjs/pm-plugins/main.js +4 -1
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +10 -9
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +4 -3
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +4 -3
- package/dist/cjs/toolbar.js +29 -20
- package/dist/cjs/transforms/column-width.js +3 -3
- package/dist/cjs/transforms/delete-columns.js +3 -2
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +21 -15
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +3 -2
- package/dist/cjs/ui/FloatingDragMenu/index.js +6 -3
- package/dist/cjs/ui/FloatingInsertButton/index.js +7 -8
- package/dist/cjs/ui/TableFloatingControls/index.js +4 -1
- package/dist/cjs/utils/drag-menu.js +5 -4
- package/dist/es2019/commands/column-resize.js +4 -3
- package/dist/es2019/commands/delete.js +2 -2
- package/dist/es2019/commands/insert.js +8 -8
- package/dist/es2019/commands-with-analytics.js +9 -8
- package/dist/es2019/event-handlers.js +2 -2
- package/dist/es2019/nodeviews/TableComponent.js +28 -17
- package/dist/es2019/nodeviews/TableContainer.js +4 -0
- package/dist/es2019/nodeviews/TableResizer.js +3 -2
- package/dist/es2019/nodeviews/table.js +5 -4
- package/dist/es2019/plugin.js +9 -6
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +7 -10
- package/dist/es2019/pm-plugins/keymap.js +9 -9
- package/dist/es2019/pm-plugins/main.js +4 -1
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +10 -9
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +4 -4
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +4 -4
- package/dist/es2019/toolbar.js +25 -22
- package/dist/es2019/transforms/column-width.js +2 -3
- package/dist/es2019/transforms/delete-columns.js +2 -2
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +12 -7
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +3 -2
- package/dist/es2019/ui/FloatingDragMenu/index.js +5 -3
- package/dist/es2019/ui/FloatingInsertButton/index.js +6 -8
- package/dist/es2019/ui/TableFloatingControls/index.js +5 -1
- package/dist/es2019/utils/drag-menu.js +4 -4
- package/dist/esm/commands/column-resize.js +4 -3
- package/dist/esm/commands/delete.js +3 -2
- package/dist/esm/commands/insert.js +12 -8
- package/dist/esm/commands-with-analytics.js +10 -7
- package/dist/esm/event-handlers.js +3 -2
- package/dist/esm/nodeviews/TableComponent.js +32 -19
- package/dist/esm/nodeviews/TableContainer.js +4 -0
- package/dist/esm/nodeviews/TableResizer.js +3 -2
- package/dist/esm/nodeviews/table.js +6 -4
- package/dist/esm/plugin.js +9 -6
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +12 -13
- package/dist/esm/pm-plugins/keymap.js +11 -9
- package/dist/esm/pm-plugins/main.js +4 -1
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +10 -9
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +4 -3
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +4 -3
- package/dist/esm/toolbar.js +29 -20
- package/dist/esm/transforms/column-width.js +3 -3
- package/dist/esm/transforms/delete-columns.js +3 -2
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +21 -15
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +3 -2
- package/dist/esm/ui/FloatingDragMenu/index.js +6 -3
- package/dist/esm/ui/FloatingInsertButton/index.js +7 -8
- package/dist/esm/ui/TableFloatingControls/index.js +4 -1
- package/dist/esm/utils/drag-menu.js +5 -4
- package/dist/types/commands/column-resize.d.ts +2 -1
- package/dist/types/commands/delete.d.ts +1 -1
- package/dist/types/commands/insert.d.ts +4 -4
- package/dist/types/commands-with-analytics.d.ts +4 -4
- package/dist/types/event-handlers.d.ts +1 -1
- package/dist/types/nodeviews/TableContainer.d.ts +4 -2
- package/dist/types/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types/nodeviews/table.d.ts +1 -0
- package/dist/types/plugin.d.ts +3 -1
- package/dist/types/pm-plugins/drag-and-drop/plugin.d.ts +1 -1
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/scale-table.d.ts +1 -1
- package/dist/types/toolbar.d.ts +5 -5
- package/dist/types/transforms/column-width.d.ts +1 -1
- package/dist/types/transforms/delete-columns.d.ts +1 -1
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types/ui/FloatingInsertButton/index.d.ts +1 -0
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +8 -2
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +16 -4
- package/dist/types/ui/TableFloatingControls/index.d.ts +8 -2
- package/dist/types/utils/drag-menu.d.ts +1 -1
- package/dist/types-ts4.5/commands/column-resize.d.ts +2 -1
- package/dist/types-ts4.5/commands/delete.d.ts +1 -1
- package/dist/types-ts4.5/commands/insert.d.ts +4 -4
- package/dist/types-ts4.5/commands-with-analytics.d.ts +4 -4
- package/dist/types-ts4.5/event-handlers.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +4 -2
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/table.d.ts +1 -0
- package/dist/types-ts4.5/plugin.d.ts +3 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +1 -1
- package/dist/types-ts4.5/toolbar.d.ts +5 -5
- package/dist/types-ts4.5/transforms/column-width.d.ts +1 -1
- package/dist/types-ts4.5/transforms/delete-columns.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingInsertButton/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +20 -4
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +10 -2
- package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
- package/package.json +3 -9
- package/src/commands/column-resize.ts +6 -6
- package/src/commands/delete.ts +7 -1
- package/src/commands/insert.ts +33 -5
- package/src/commands-with-analytics.ts +14 -2
- package/src/event-handlers.ts +2 -0
- package/src/nodeviews/TableComponent.tsx +28 -28
- package/src/nodeviews/TableContainer.tsx +6 -0
- package/src/nodeviews/TableResizer.tsx +4 -0
- package/src/nodeviews/table.tsx +4 -2
- package/src/plugin.tsx +19 -7
- package/src/pm-plugins/drag-and-drop/plugin.ts +26 -13
- package/src/pm-plugins/keymap.ts +30 -4
- package/src/pm-plugins/main.ts +2 -0
- package/src/pm-plugins/table-resizing/event-handlers.ts +12 -14
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +5 -5
- package/src/pm-plugins/table-resizing/utils/scale-table.ts +6 -4
- package/src/toolbar.tsx +46 -12
- package/src/transforms/column-width.ts +7 -3
- package/src/transforms/delete-columns.ts +6 -2
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +12 -4
- package/src/ui/FloatingDragMenu/DragMenu.tsx +3 -0
- package/src/ui/FloatingDragMenu/index.tsx +4 -4
- package/src/ui/FloatingInsertButton/index.tsx +12 -9
- package/src/ui/TableFloatingControls/index.tsx +4 -1
- package/src/utils/drag-menu.ts +13 -4
- package/tsconfig.app.json +3 -0
|
@@ -3,10 +3,10 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
7
|
-
export declare const addColumnBefore: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
8
|
-
export declare const addColumnAfter: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
9
|
-
export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (column: number) => Command;
|
|
6
|
+
export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
7
|
+
export declare const addColumnBefore: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
8
|
+
export declare const addColumnAfter: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
9
|
+
export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (column: number) => Command;
|
|
10
10
|
export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean, isCellBackgroundDuplicated?: boolean) => Command;
|
|
11
11
|
export declare const createTable: (isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined | null) => Command;
|
|
12
12
|
export declare const insertTableWithSize: (isFullWidthModeEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => (rowsCount: number, colsCount: number, inputMethod?: INPUT_METHOD.PICKER) => EditorCommand;
|
|
@@ -16,11 +16,11 @@ export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalytic
|
|
|
16
16
|
export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, cellColor: string, targetCellPosition?: number, editorView?: EditorView | null) => Command;
|
|
17
17
|
export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
|
|
18
18
|
export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated?: boolean) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
|
|
19
|
-
export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
|
|
20
|
-
export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
|
|
19
|
+
export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, isTableFixedColumnWidthsOptionEnabled: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
|
|
20
|
+
export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
|
|
21
21
|
export declare const deleteRowsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect, isHeaderRowRequired: boolean) => Command;
|
|
22
|
-
export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
|
|
23
|
-
export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
22
|
+
export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
|
|
23
|
+
export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
24
24
|
export declare const deleteTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
|
|
25
25
|
export declare const deleteTableIfSelectedWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) => Command;
|
|
26
26
|
export declare const toggleHeaderRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
|
|
@@ -12,7 +12,7 @@ export declare const handleMouseEnter: (view: EditorView, mouseEvent: Event) =>
|
|
|
12
12
|
export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
|
|
13
13
|
export declare const handleMouseMove: (view: EditorView, event: Event) => boolean;
|
|
14
14
|
export declare function handleTripleClick(view: EditorView, pos: number): boolean;
|
|
15
|
-
export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Transaction;
|
|
15
|
+
export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Transaction;
|
|
16
16
|
export declare const isTableInFocus: (view: EditorView) => boolean;
|
|
17
17
|
export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
|
|
18
18
|
export declare const withCellTracking: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
|
|
@@ -28,10 +28,11 @@ type ResizableTableContainerProps = {
|
|
|
28
28
|
tableWrapperHeight?: number;
|
|
29
29
|
isWholeTableInDanger?: boolean;
|
|
30
30
|
isTableScalingEnabled?: boolean;
|
|
31
|
+
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
31
32
|
isTableAlignmentEnabled?: boolean;
|
|
32
33
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
33
34
|
};
|
|
34
|
-
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
|
|
35
|
+
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
|
|
35
36
|
type TableContainerProps = {
|
|
36
37
|
node: PMNode;
|
|
37
38
|
className: string;
|
|
@@ -46,8 +47,9 @@ type TableContainerProps = {
|
|
|
46
47
|
isWholeTableInDanger?: boolean;
|
|
47
48
|
isTableResizingEnabled: boolean | undefined;
|
|
48
49
|
isTableScalingEnabled?: boolean;
|
|
50
|
+
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
49
51
|
isTableAlignmentEnabled?: boolean;
|
|
50
52
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
51
53
|
};
|
|
52
|
-
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
|
|
54
|
+
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
|
|
53
55
|
export {};
|
|
@@ -20,6 +20,7 @@ interface TableResizerProps {
|
|
|
20
20
|
displayGapCursor: (toggle: boolean) => boolean;
|
|
21
21
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
22
22
|
isTableScalingEnabled?: boolean;
|
|
23
|
+
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
23
24
|
isTableAlignmentEnabled?: boolean;
|
|
24
25
|
isWholeTableInDanger?: boolean;
|
|
25
26
|
isFullWidthModeEnabled?: boolean;
|
|
@@ -29,5 +30,5 @@ export interface TableResizerImprovementProps extends TableResizerProps {
|
|
|
29
30
|
onResizeStop?: () => void;
|
|
30
31
|
onResizeStart?: () => void;
|
|
31
32
|
}
|
|
32
|
-
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
|
|
33
|
+
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
|
|
33
34
|
export {};
|
|
@@ -16,6 +16,7 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
16
16
|
eventDispatcher?: EventDispatcher;
|
|
17
17
|
getPos: getPosHandlerNode;
|
|
18
18
|
options: import("./types").TableOptions | undefined;
|
|
19
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
19
20
|
constructor(props: Props);
|
|
20
21
|
getContentDOM(): {
|
|
21
22
|
dom: HTMLElement;
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
7
7
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
8
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
9
|
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
9
10
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
10
11
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
@@ -44,7 +45,8 @@ export type TablePlugin = NextEditorPlugin<'table', {
|
|
|
44
45
|
SelectionPlugin,
|
|
45
46
|
OptionalPlugin<AccessibilityUtilsPlugin>,
|
|
46
47
|
OptionalPlugin<MediaPlugin>,
|
|
47
|
-
OptionalPlugin<EditorViewModePlugin
|
|
48
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
49
|
+
OptionalPlugin<FeatureFlagsPlugin>
|
|
48
50
|
];
|
|
49
51
|
}>;
|
|
50
52
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
export declare const createPlugin: (dispatch: Dispatch, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("./types").DragAndDropPluginState>;
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, editorAnalyticsAPI?: EditorAnalyticsAPI, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean) => SafePlugin<import("./types").DragAndDropPluginState>;
|
|
@@ -3,5 +3,5 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { PluginInjectionAPIWithA11y } from '../types';
|
|
6
|
-
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, shouldUseIncreasedScalingPercent?: boolean): SafePlugin;
|
|
6
|
+
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean): SafePlugin;
|
|
7
7
|
export default keymapPlugin;
|
|
@@ -27,4 +27,4 @@ export declare const normaliseTableLayout: (input: string | undefined | null) =>
|
|
|
27
27
|
export declare const getNewResizeStateFromSelectedColumns: (rect: Rect, state: EditorState, domAtPos: (pos: number) => {
|
|
28
28
|
node: Node;
|
|
29
29
|
offset: number;
|
|
30
|
-
}, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled?: boolean) => ResizeStateWithAnalytics | undefined;
|
|
30
|
+
}, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean) => ResizeStateWithAnalytics | undefined;
|
|
@@ -16,5 +16,5 @@ export interface ScaleOptions {
|
|
|
16
16
|
export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState | undefined;
|
|
17
17
|
export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
|
|
18
18
|
export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
|
|
19
|
-
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean) => void;
|
|
19
|
+
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean, isTableWithFixedColumnWidthsOptionEnabled?: boolean) => void;
|
|
20
20
|
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
|
package/dist/types/toolbar.d.ts
CHANGED
|
@@ -8,17 +8,17 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
|
8
8
|
import type { TablePluginOptions } from './plugin';
|
|
9
9
|
import type { AlignmentOptions, PluginConfig, ToolbarMenuConfig, ToolbarMenuContext, ToolbarMenuState } from './types';
|
|
10
10
|
export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingWithFixedColumnWidthsOptionShown?: boolean, areTableColumnWidthsFixed?: boolean) => FloatingToolbarItem<Command>;
|
|
11
|
-
export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => FloatingToolbarDropdown<Command>;
|
|
11
|
+
export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => FloatingToolbarDropdown<Command>;
|
|
12
12
|
export declare const getClosestSelectionRect: (state: EditorState) => Rect | undefined;
|
|
13
13
|
export declare const getClosestSelectionOrTableRect: (state: EditorState) => Rect | undefined;
|
|
14
|
-
export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions,
|
|
15
|
-
export declare const getDistributeConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => Command;
|
|
14
|
+
export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (config: PluginConfig) => FloatingToolbarHandler;
|
|
15
|
+
export declare const getDistributeConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean) => Command;
|
|
16
16
|
type AlignmentIcon = {
|
|
17
17
|
id?: string;
|
|
18
18
|
value: AlignmentOptions;
|
|
19
19
|
icon: React.ComponentClass<any>;
|
|
20
20
|
};
|
|
21
|
-
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null) => Array<FloatingToolbarDropdown<Command>>;
|
|
21
|
+
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null, shouldUseIncreasedScalingPercent: boolean) => Array<FloatingToolbarDropdown<Command>>;
|
|
22
22
|
export declare const getSelectedAlignmentIcon: (alignmentIcons: AlignmentIcon[], selectedNode: PMNode) => AlignmentIcon | undefined;
|
|
23
|
-
export declare const isLayoutOptionDisabled: (selectedNode: PMNode, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null) => boolean;
|
|
23
|
+
export declare const isLayoutOptionDisabled: (selectedNode: PMNode, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null, shouldUseIncreasedScalingPercent: boolean) => boolean;
|
|
24
24
|
export {};
|
|
@@ -21,4 +21,4 @@ export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNod
|
|
|
21
21
|
* @param view
|
|
22
22
|
* @returns Updated transaction with rescaled columns for a given table
|
|
23
23
|
*/
|
|
24
|
-
export declare const rescaleColumns: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
24
|
+
export declare const rescaleColumns: (isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
4
|
-
export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
|
|
4
|
+
export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -27,8 +27,9 @@ type DragMenuProps = {
|
|
|
27
27
|
isTableScalingEnabled?: boolean;
|
|
28
28
|
tableDuplicateCellColouring?: boolean;
|
|
29
29
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
30
|
+
isTableFixedColumnWidthsOptionEnabled?: boolean;
|
|
30
31
|
};
|
|
31
|
-
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
32
|
+
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, isTableFixedColumnWidthsOptionEnabled, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
32
33
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps>> & {
|
|
33
34
|
WrappedComponent: React.ComponentType<DragMenuProps & WrappedComponentProps>;
|
|
34
35
|
};
|
|
@@ -14,6 +14,7 @@ export interface Props {
|
|
|
14
14
|
isHeaderColumnEnabled?: boolean;
|
|
15
15
|
isHeaderRowEnabled?: boolean;
|
|
16
16
|
isDragAndDropEnabled?: boolean;
|
|
17
|
+
isTableScalingEnabled?: boolean;
|
|
17
18
|
mountPoint?: HTMLElement;
|
|
18
19
|
boundariesElement?: HTMLElement;
|
|
19
20
|
scrollableElement?: HTMLElement;
|
|
@@ -130,7 +130,10 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
130
130
|
};
|
|
131
131
|
}, {
|
|
132
132
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
133
|
-
} | undefined
|
|
133
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
134
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
135
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
136
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
134
137
|
}, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
135
138
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
136
139
|
sharedState: {
|
|
@@ -231,6 +234,9 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
231
234
|
};
|
|
232
235
|
}, {
|
|
233
236
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
234
|
-
} | undefined
|
|
237
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
238
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
239
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
240
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
235
241
|
}) => JSX.Element;
|
|
236
242
|
export default ColumnControls;
|
|
@@ -111,7 +111,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
111
111
|
};
|
|
112
112
|
}, {
|
|
113
113
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
114
|
-
} | undefined
|
|
114
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
115
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
116
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
117
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
115
118
|
}, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
116
119
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
117
120
|
sharedState: {
|
|
@@ -212,7 +215,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
212
215
|
};
|
|
213
216
|
}, {
|
|
214
217
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
215
|
-
} | undefined
|
|
218
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
219
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
220
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
221
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
216
222
|
}>> & {
|
|
217
223
|
WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps & {
|
|
218
224
|
api?: import("@atlaskit/editor-common/types").PublicPluginAPI<[import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"table", {
|
|
@@ -324,7 +330,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
324
330
|
};
|
|
325
331
|
}, {
|
|
326
332
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
327
|
-
} | undefined
|
|
333
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
334
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
335
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
336
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
328
337
|
}, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
329
338
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
330
339
|
sharedState: {
|
|
@@ -425,7 +434,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
425
434
|
};
|
|
426
435
|
}, {
|
|
427
436
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
428
|
-
} | undefined
|
|
437
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
438
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
439
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
440
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
429
441
|
}>;
|
|
430
442
|
};
|
|
431
443
|
export declare const DragCornerControls: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps>> & {
|
|
@@ -139,7 +139,10 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
139
139
|
};
|
|
140
140
|
}, {
|
|
141
141
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
142
|
-
} | undefined
|
|
142
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
143
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
144
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
145
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
143
146
|
}, import("../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
144
147
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
145
148
|
sharedState: {
|
|
@@ -240,6 +243,9 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
240
243
|
};
|
|
241
244
|
}, {
|
|
242
245
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
243
|
-
} | undefined
|
|
246
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
247
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
248
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
249
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
244
250
|
}) => JSX.Element | null;
|
|
245
251
|
export default TableFloatingControls;
|
|
@@ -13,4 +13,4 @@ export interface DragMenuConfig extends DropdownOptionT<Command> {
|
|
|
13
13
|
icon?: React.ComponentType<React.PropsWithChildren<IconProps>>;
|
|
14
14
|
keymap?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, shouldUseIncreasedScalingPercent?: boolean) => DragMenuConfig[];
|
|
16
|
+
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => DragMenuConfig[];
|
|
@@ -12,10 +12,11 @@ export declare const activateNextResizeArea: ({ direction, ariaNotify, getIntl,
|
|
|
12
12
|
ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined;
|
|
13
13
|
getIntl?: (() => IntlShape) | undefined;
|
|
14
14
|
}) => Command;
|
|
15
|
-
export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWidth, isTableScalingEnabled, ariaNotify, getIntl, }: {
|
|
15
|
+
export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, ariaNotify, getIntl, }: {
|
|
16
16
|
stepSize: number;
|
|
17
17
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
18
18
|
isTableScalingEnabled: boolean;
|
|
19
|
+
isTableFixedColumnWidthsOptionEnabled: boolean;
|
|
19
20
|
ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined;
|
|
20
21
|
getIntl?: (() => IntlShape) | undefined;
|
|
21
22
|
originalTr?: Transaction | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
3
|
-
export declare const deleteColumnsCommand: (rect: Rect, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
3
|
+
export declare const deleteColumnsCommand: (rect: Rect, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
@@ -3,10 +3,10 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
7
|
-
export declare const addColumnBefore: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
8
|
-
export declare const addColumnAfter: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
9
|
-
export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (column: number) => Command;
|
|
6
|
+
export declare function addColumnAt(isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
7
|
+
export declare const addColumnBefore: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
8
|
+
export declare const addColumnAfter: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
9
|
+
export declare const insertColumn: (isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (column: number) => Command;
|
|
10
10
|
export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean, isCellBackgroundDuplicated?: boolean) => Command;
|
|
11
11
|
export declare const createTable: (isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined | null) => Command;
|
|
12
12
|
export declare const insertTableWithSize: (isFullWidthModeEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => (rowsCount: number, colsCount: number, inputMethod?: INPUT_METHOD.PICKER) => EditorCommand;
|
|
@@ -16,11 +16,11 @@ export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalytic
|
|
|
16
16
|
export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, cellColor: string, targetCellPosition?: number, editorView?: EditorView | null) => Command;
|
|
17
17
|
export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
|
|
18
18
|
export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated?: boolean) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
|
|
19
|
-
export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
|
|
20
|
-
export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
|
|
19
|
+
export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, isTableFixedColumnWidthsOptionEnabled: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => Command;
|
|
20
|
+
export declare const insertColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellbackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
|
|
21
21
|
export declare const deleteRowsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect, isHeaderRowRequired: boolean) => Command;
|
|
22
|
-
export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
|
|
23
|
-
export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
22
|
+
export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
|
|
23
|
+
export declare const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Command;
|
|
24
24
|
export declare const deleteTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
|
|
25
25
|
export declare const deleteTableIfSelectedWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) => Command;
|
|
26
26
|
export declare const toggleHeaderRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Command;
|
|
@@ -12,7 +12,7 @@ export declare const handleMouseEnter: (view: EditorView, mouseEvent: Event) =>
|
|
|
12
12
|
export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
|
|
13
13
|
export declare const handleMouseMove: (view: EditorView, event: Event) => boolean;
|
|
14
14
|
export declare function handleTripleClick(view: EditorView, pos: number): boolean;
|
|
15
|
-
export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Transaction;
|
|
15
|
+
export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI, editorView?: EditorView, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => Transaction;
|
|
16
16
|
export declare const isTableInFocus: (view: EditorView) => boolean;
|
|
17
17
|
export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
|
|
18
18
|
export declare const withCellTracking: (eventHandler: (view: EditorView, mouseEvent: Event) => boolean) => (view: EditorView, mouseEvent: Event) => boolean;
|
|
@@ -28,10 +28,11 @@ type ResizableTableContainerProps = {
|
|
|
28
28
|
tableWrapperHeight?: number;
|
|
29
29
|
isWholeTableInDanger?: boolean;
|
|
30
30
|
isTableScalingEnabled?: boolean;
|
|
31
|
+
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
31
32
|
isTableAlignmentEnabled?: boolean;
|
|
32
33
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
33
34
|
};
|
|
34
|
-
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
|
|
35
|
+
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
|
|
35
36
|
type TableContainerProps = {
|
|
36
37
|
node: PMNode;
|
|
37
38
|
className: string;
|
|
@@ -46,8 +47,9 @@ type TableContainerProps = {
|
|
|
46
47
|
isWholeTableInDanger?: boolean;
|
|
47
48
|
isTableResizingEnabled: boolean | undefined;
|
|
48
49
|
isTableScalingEnabled?: boolean;
|
|
50
|
+
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
49
51
|
isTableAlignmentEnabled?: boolean;
|
|
50
52
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
51
53
|
};
|
|
52
|
-
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
|
|
54
|
+
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
|
|
53
55
|
export {};
|
|
@@ -20,6 +20,7 @@ interface TableResizerProps {
|
|
|
20
20
|
displayGapCursor: (toggle: boolean) => boolean;
|
|
21
21
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
22
22
|
isTableScalingEnabled?: boolean;
|
|
23
|
+
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
23
24
|
isTableAlignmentEnabled?: boolean;
|
|
24
25
|
isWholeTableInDanger?: boolean;
|
|
25
26
|
isFullWidthModeEnabled?: boolean;
|
|
@@ -29,5 +30,5 @@ export interface TableResizerImprovementProps extends TableResizerProps {
|
|
|
29
30
|
onResizeStop?: () => void;
|
|
30
31
|
onResizeStart?: () => void;
|
|
31
32
|
}
|
|
32
|
-
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
|
|
33
|
+
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, }: PropsWithChildren<TableResizerImprovementProps>) => JSX.Element;
|
|
33
34
|
export {};
|
|
@@ -16,6 +16,7 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
16
16
|
eventDispatcher?: EventDispatcher;
|
|
17
17
|
getPos: getPosHandlerNode;
|
|
18
18
|
options: import("./types").TableOptions | undefined;
|
|
19
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
19
20
|
constructor(props: Props);
|
|
20
21
|
getContentDOM(): {
|
|
21
22
|
dom: HTMLElement;
|
|
@@ -5,6 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
7
7
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
8
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
9
|
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
9
10
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
10
11
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
@@ -44,7 +45,8 @@ export type TablePlugin = NextEditorPlugin<'table', {
|
|
|
44
45
|
SelectionPlugin,
|
|
45
46
|
OptionalPlugin<AccessibilityUtilsPlugin>,
|
|
46
47
|
OptionalPlugin<MediaPlugin>,
|
|
47
|
-
OptionalPlugin<EditorViewModePlugin
|
|
48
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
49
|
+
OptionalPlugin<FeatureFlagsPlugin>
|
|
48
50
|
];
|
|
49
51
|
}>;
|
|
50
52
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
export declare const createPlugin: (dispatch: Dispatch, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("./types").DragAndDropPluginState>;
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, editorAnalyticsAPI?: EditorAnalyticsAPI, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean) => SafePlugin<import("./types").DragAndDropPluginState>;
|
|
@@ -3,5 +3,5 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { PluginInjectionAPIWithA11y } from '../types';
|
|
6
|
-
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, shouldUseIncreasedScalingPercent?: boolean): SafePlugin;
|
|
6
|
+
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, isFullWidthEnabled?: boolean, pluginInjectionApi?: PluginInjectionAPIWithA11y, getIntl?: () => IntlShape, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean): SafePlugin;
|
|
7
7
|
export default keymapPlugin;
|
|
@@ -27,4 +27,4 @@ export declare const normaliseTableLayout: (input: string | undefined | null) =>
|
|
|
27
27
|
export declare const getNewResizeStateFromSelectedColumns: (rect: Rect, state: EditorState, domAtPos: (pos: number) => {
|
|
28
28
|
node: Node;
|
|
29
29
|
offset: number;
|
|
30
|
-
}, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled?: boolean) => ResizeStateWithAnalytics | undefined;
|
|
30
|
+
}, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean) => ResizeStateWithAnalytics | undefined;
|
|
@@ -16,5 +16,5 @@ export interface ScaleOptions {
|
|
|
16
16
|
export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState | undefined;
|
|
17
17
|
export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => ResizeState;
|
|
18
18
|
export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
|
|
19
|
-
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean) => void;
|
|
19
|
+
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean, isTableWithFixedColumnWidthsOptionEnabled?: boolean) => void;
|
|
20
20
|
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -8,17 +8,17 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
|
8
8
|
import type { TablePluginOptions } from './plugin';
|
|
9
9
|
import type { AlignmentOptions, PluginConfig, ToolbarMenuConfig, ToolbarMenuContext, ToolbarMenuState } from './types';
|
|
10
10
|
export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingWithFixedColumnWidthsOptionShown?: boolean, areTableColumnWidthsFixed?: boolean) => FloatingToolbarItem<Command>;
|
|
11
|
-
export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => FloatingToolbarDropdown<Command>;
|
|
11
|
+
export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isCellBackgroundDuplicated?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => FloatingToolbarDropdown<Command>;
|
|
12
12
|
export declare const getClosestSelectionRect: (state: EditorState) => Rect | undefined;
|
|
13
13
|
export declare const getClosestSelectionOrTableRect: (state: EditorState) => Rect | undefined;
|
|
14
|
-
export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions,
|
|
15
|
-
export declare const getDistributeConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean) => Command;
|
|
14
|
+
export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null, options?: TablePluginOptions, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (config: PluginConfig) => FloatingToolbarHandler;
|
|
15
|
+
export declare const getDistributeConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean) => Command;
|
|
16
16
|
type AlignmentIcon = {
|
|
17
17
|
id?: string;
|
|
18
18
|
value: AlignmentOptions;
|
|
19
19
|
icon: React.ComponentClass<any>;
|
|
20
20
|
};
|
|
21
|
-
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null) => Array<FloatingToolbarDropdown<Command>>;
|
|
21
|
+
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null, shouldUseIncreasedScalingPercent: boolean) => Array<FloatingToolbarDropdown<Command>>;
|
|
22
22
|
export declare const getSelectedAlignmentIcon: (alignmentIcons: AlignmentIcon[], selectedNode: PMNode) => AlignmentIcon | undefined;
|
|
23
|
-
export declare const isLayoutOptionDisabled: (selectedNode: PMNode, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null) => boolean;
|
|
23
|
+
export declare const isLayoutOptionDisabled: (selectedNode: PMNode, getEditorContainerWidth: GetEditorContainerWidth, getDomRef: (editorView: EditorView) => HTMLElement | undefined, editorView: EditorView | null, shouldUseIncreasedScalingPercent: boolean) => boolean;
|
|
24
24
|
export {};
|
|
@@ -21,4 +21,4 @@ export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNod
|
|
|
21
21
|
* @param view
|
|
22
22
|
* @returns Updated transaction with rescaled columns for a given table
|
|
23
23
|
*/
|
|
24
|
-
export declare const rescaleColumns: (isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
24
|
+
export declare const rescaleColumns: (isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
4
|
-
export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
|
|
4
|
+
export declare const deleteColumns: (rect: Rect, allowCustomStep: boolean, view?: EditorView, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -27,8 +27,9 @@ type DragMenuProps = {
|
|
|
27
27
|
isTableScalingEnabled?: boolean;
|
|
28
28
|
tableDuplicateCellColouring?: boolean;
|
|
29
29
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
30
|
+
isTableFixedColumnWidthsOptionEnabled?: boolean;
|
|
30
31
|
};
|
|
31
|
-
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
32
|
+
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, isTableFixedColumnWidthsOptionEnabled, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
32
33
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps>> & {
|
|
33
34
|
WrappedComponent: React.ComponentType<DragMenuProps & WrappedComponentProps>;
|
|
34
35
|
};
|
|
@@ -14,6 +14,7 @@ export interface Props {
|
|
|
14
14
|
isHeaderColumnEnabled?: boolean;
|
|
15
15
|
isHeaderRowEnabled?: boolean;
|
|
16
16
|
isDragAndDropEnabled?: boolean;
|
|
17
|
+
isTableScalingEnabled?: boolean;
|
|
17
18
|
mountPoint?: HTMLElement;
|
|
18
19
|
boundariesElement?: HTMLElement;
|
|
19
20
|
scrollableElement?: HTMLElement;
|