@atlaskit/editor-plugin-table 12.1.13 → 12.1.15
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 +19 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-dev-agents/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-passionfruit/tsconfig.json +117 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/afm-rovo-extension/tsconfig.json +3 -0
- package/afm-townsquare/tsconfig.json +3 -0
- package/afm-volt/tsconfig.json +13 -4
- package/dist/cjs/nodeviews/TableComponent.js +4 -4
- package/dist/cjs/nodeviews/TableRow.js +24 -1
- package/dist/cjs/nodeviews/table-node-views.js +1 -1
- package/dist/cjs/nodeviews/table.js +10 -5
- package/dist/cjs/pm-plugins/main.js +2 -1
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +2 -7
- package/dist/es2019/nodeviews/TableComponent.js +4 -4
- package/dist/es2019/nodeviews/TableRow.js +24 -1
- package/dist/es2019/nodeviews/table-node-views.js +1 -1
- package/dist/es2019/nodeviews/table.js +9 -4
- package/dist/es2019/pm-plugins/main.js +2 -1
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +5 -14
- package/dist/esm/nodeviews/TableComponent.js +4 -4
- package/dist/esm/nodeviews/TableRow.js +24 -1
- package/dist/esm/nodeviews/table-node-views.js +1 -1
- package/dist/esm/nodeviews/table.js +10 -5
- package/dist/esm/pm-plugins/main.js +2 -1
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -6
- package/dist/types/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types/nodeviews/TableRow.d.ts +3 -1
- package/dist/types/nodeviews/table.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/commands.d.ts +2 -2
- package/dist/types/pm-plugins/analytics/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
- package/dist/types/pm-plugins/commands/column-resize.d.ts +10 -10
- package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
- package/dist/types/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
- package/dist/types/pm-plugins/commands/misc.d.ts +2 -2
- package/dist/types/pm-plugins/commands/selection.d.ts +6 -6
- package/dist/types/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
- package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/utils/create.d.ts +10 -10
- package/dist/types/pm-plugins/utils/decoration.d.ts +3 -3
- package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types/pm-plugins/utils/drag-menu.d.ts +3 -3
- package/dist/types/pm-plugins/utils/merged-cells.d.ts +3 -2
- package/dist/types/tablePluginType.d.ts +2 -0
- package/dist/types/ui/DragHandle/index.d.ts +4 -14
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
- package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/index.d.ts +1 -7
- package/dist/types/ui/global-styles.d.ts +2 -8
- package/dist/types/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/TableRow.d.ts +3 -1
- package/dist/types-ts4.5/nodeviews/table.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/analytics/commands.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/analytics/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +10 -10
- package/dist/types-ts4.5/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/commands/misc.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/commands/selection.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +10 -10
- package/dist/types-ts4.5/pm-plugins/utils/decoration.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/drag-menu.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/merged-cells.d.ts +3 -2
- package/dist/types-ts4.5/tablePluginType.d.ts +2 -0
- package/dist/types-ts4.5/ui/DragHandle/index.d.ts +4 -14
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +1 -7
- package/dist/types-ts4.5/ui/global-styles.d.ts +2 -8
- package/dist/types-ts4.5/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
- package/package.json +8 -10
- package/src/nodeviews/TableComponent.tsx +8 -4
- package/src/nodeviews/TableRow.ts +38 -1
- package/src/nodeviews/table-node-views.ts +1 -1
- package/src/nodeviews/table.tsx +9 -0
- package/src/pm-plugins/main.ts +1 -1
- package/src/tablePluginType.ts +2 -0
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +5 -14
- package/tsconfig.app.json +3 -0
|
@@ -23,5 +23,5 @@ type DragControlsProps = {
|
|
|
23
23
|
selection?: Selection;
|
|
24
24
|
};
|
|
25
25
|
export declare const DragControls: ({ tableRef, tableNode, tableWidth, hoveredCell, tableActive, editorView, isInDanger, isResizing, isTableHovered, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, selection, }: DragControlsProps) => React.JSX.Element | null;
|
|
26
|
-
export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps,
|
|
26
|
+
export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps, "selection">) => React.JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -31,12 +31,6 @@ interface TableFloatingControlsProps {
|
|
|
31
31
|
isChromelessEditor?: boolean;
|
|
32
32
|
}
|
|
33
33
|
export declare const TableFloatingControls: ({ editorView, tableRef, tableNode, isInDanger, isResizing, isNumberColumnEnabled, isHeaderRowEnabled, isHeaderColumnEnabled, tableActive, hasHeaderRow, hoveredRows, stickyHeader, isDragAndDropEnabled, hoveredCell, isTableHovered, tableWrapperWidth, api, isChromelessEditor, }: TableFloatingControlsProps & {
|
|
34
|
-
api?:
|
|
35
|
-
pluginConfiguration: import("../../tablePluginType").TablePluginOptions | undefined;
|
|
36
|
-
actions: import("../../tablePluginType").TablePluginActions;
|
|
37
|
-
sharedState?: import("../../types").TableSharedState | undefined;
|
|
38
|
-
commands: import("../../tablePluginType").TablePluginCommands;
|
|
39
|
-
dependencies: import("../../tablePluginType").TablePluginDependencies;
|
|
40
|
-
}> | undefined;
|
|
34
|
+
api?: ExtractInjectionAPI<TablePlugin>;
|
|
41
35
|
}) => React.JSX.Element | null;
|
|
42
36
|
export default TableFloatingControls;
|
|
@@ -7,12 +7,6 @@ import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
|
7
7
|
import type { PluginInjectionAPI } from '../types';
|
|
8
8
|
export declare const GlobalStylesWrapper: ({ featureFlags, isDragAndDropEnabledOption, api, }: {
|
|
9
9
|
featureFlags: FeatureFlags | undefined;
|
|
10
|
-
isDragAndDropEnabledOption?: boolean
|
|
11
|
-
api?:
|
|
12
|
-
pluginConfiguration: import("..").TablePluginOptions | undefined;
|
|
13
|
-
actions: import("..").TablePluginActions;
|
|
14
|
-
sharedState?: import("../types").TableSharedState | undefined;
|
|
15
|
-
commands: import("..").TablePluginCommands;
|
|
16
|
-
dependencies: import("..").TablePluginDependencies;
|
|
17
|
-
}> | undefined;
|
|
10
|
+
isDragAndDropEnabledOption?: boolean;
|
|
11
|
+
api?: PluginInjectionAPI;
|
|
18
12
|
}) => jsx.JSX.Element;
|
|
@@ -18,5 +18,5 @@ type Options = {
|
|
|
18
18
|
* @returns
|
|
19
19
|
* @example
|
|
20
20
|
*/
|
|
21
|
-
export declare const useInternalTablePluginStateSelector: <K extends
|
|
21
|
+
export declare const useInternalTablePluginStateSelector: <K extends keyof TableSharedStateInternal>(api: ExtractInjectionAPI<TablePlugin> | undefined, key: K, options?: Options) => TableSharedStateInternal[K] | undefined;
|
|
22
22
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
export declare const ExternalDropTargets: ({ editorView, node, getScrollOffset, getTableWrapperWidth, }: {
|
|
5
5
|
editorView: EditorView;
|
|
6
|
-
node?: PMNode
|
|
6
|
+
node?: PMNode;
|
|
7
7
|
getScrollOffset: () => number;
|
|
8
8
|
getTableWrapperWidth: () => number;
|
|
9
9
|
}) => React.JSX.Element | null;
|
|
@@ -39,6 +39,7 @@ interface ComponentProps {
|
|
|
39
39
|
isTableHovered?: boolean;
|
|
40
40
|
isWholeTableInDanger?: boolean;
|
|
41
41
|
selection?: Selection;
|
|
42
|
+
limitedMode?: boolean;
|
|
42
43
|
}
|
|
43
44
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ComponentProps>> & {
|
|
44
45
|
WrappedComponent: React.ComponentType<ComponentProps>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import { type PluginInjectionAPI } from '../types';
|
|
4
5
|
import TableNodeView from './TableNodeViewBase';
|
|
5
6
|
export default class TableRow extends TableNodeView<HTMLTableRowElement> implements NodeView {
|
|
6
7
|
private nodeVisibilityObserverCleanupFn?;
|
|
7
|
-
|
|
8
|
+
cleanup: () => void;
|
|
9
|
+
constructor(node: PMNode, view: EditorView, getPos: () => number | undefined, eventDispatcher: EventDispatcher, api?: PluginInjectionAPI);
|
|
8
10
|
subscribeWhenRowVisible(): void;
|
|
9
11
|
/**
|
|
10
12
|
* Variables
|
|
@@ -20,7 +20,7 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
20
20
|
constructor(props: Props);
|
|
21
21
|
getContentDOM(): {
|
|
22
22
|
dom: HTMLElement;
|
|
23
|
-
contentDOM?: HTMLElement
|
|
23
|
+
contentDOM?: HTMLElement;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Handles moving the table from ProseMirror's DOM structure into a React-rendered table node.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { ActionType, RowOrColumnMovedState } from './types';
|
|
3
|
-
export declare const updateRowOrColumnMoved: (nextState: Omit<RowOrColumnMovedState,
|
|
3
|
+
export declare const updateRowOrColumnMoved: (nextState: Omit<RowOrColumnMovedState, "currentActions">, nextAction: ActionType) => import("@atlaskit/editor-common/types").Command;
|
|
4
4
|
export declare const resetRowOrColumnMovedTransform: () => (tr: Transaction) => Transaction;
|
|
5
|
-
export declare const updateRowOrColumnMovedTransform: (nextState: Omit<RowOrColumnMovedState,
|
|
5
|
+
export declare const updateRowOrColumnMovedTransform: (nextState: Omit<RowOrColumnMovedState, "currentActions">, nextAction: ActionType) => (state: EditorState, tr: Transaction) => Transaction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").AnalyticPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").AnalyticPluginState)) => import("prosemirror-state").SafeStateField<import("./types").AnalyticPluginState>, createCommand: <A = import("./actions").AnalyticPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (
|
|
1
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").AnalyticPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").AnalyticPluginState)) => import("prosemirror-state").SafeStateField<import("./types").AnalyticPluginState>, createCommand: <A = import("./actions").AnalyticPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").AnalyticPluginState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActionType, RowOrColumnMovedState } from '../types';
|
|
2
|
-
export declare const getMovedPayload: (nextState: Omit<RowOrColumnMovedState,
|
|
2
|
+
export declare const getMovedPayload: (nextState: Omit<RowOrColumnMovedState, "currentActions">, nextAction: ActionType, prevState: RowOrColumnMovedState) => RowOrColumnMovedState | {
|
|
3
3
|
currentActions: string[];
|
|
4
4
|
numberOfCells: number | undefined;
|
|
5
5
|
type: "row" | "column" | undefined;
|
|
@@ -6,14 +6,14 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
6
6
|
import type { Direction } from '@atlaskit/editor-tables/types';
|
|
7
7
|
import type { PluginInjectionAPI } from '../../types';
|
|
8
8
|
export declare const initiateKeyboardColumnResizing: ({ ariaNotify, getIntl, nodeViewPortalProviderAPI, }: {
|
|
9
|
-
ariaNotify?: (
|
|
10
|
-
getIntl?: (
|
|
9
|
+
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
10
|
+
getIntl?: () => IntlShape;
|
|
11
11
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
12
12
|
}) => Command;
|
|
13
13
|
export declare const activateNextResizeArea: ({ direction, ariaNotify, getIntl, nodeViewPortalProviderAPI, }: {
|
|
14
14
|
direction: Direction;
|
|
15
|
-
ariaNotify?: (
|
|
16
|
-
getIntl?: (
|
|
15
|
+
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
16
|
+
getIntl?: () => IntlShape;
|
|
17
17
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
18
18
|
}) => Command;
|
|
19
19
|
export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor, ariaNotify, api, getIntl, }: {
|
|
@@ -23,12 +23,12 @@ export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWid
|
|
|
23
23
|
isTableFixedColumnWidthsOptionEnabled: boolean;
|
|
24
24
|
isCommentEditor: boolean;
|
|
25
25
|
api: PluginInjectionAPI | undefined | null;
|
|
26
|
-
ariaNotify?: (
|
|
27
|
-
getIntl?: (
|
|
28
|
-
originalTr?: Transaction
|
|
26
|
+
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
27
|
+
getIntl?: () => IntlShape;
|
|
28
|
+
originalTr?: Transaction;
|
|
29
29
|
}) => Command;
|
|
30
30
|
export declare const stopKeyboardColumnResizing: ({ ariaNotify, getIntl, originalTr, }: {
|
|
31
|
-
ariaNotify?: (
|
|
32
|
-
getIntl?: (
|
|
33
|
-
originalTr?: Transaction
|
|
31
|
+
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
32
|
+
getIntl?: () => IntlShape;
|
|
33
|
+
originalTr?: Transaction;
|
|
34
34
|
}) => Command;
|
|
@@ -15,7 +15,7 @@ export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalytic
|
|
|
15
15
|
export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, cellColor: string, editorView?: EditorView | null) => Command;
|
|
16
16
|
export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
|
|
17
17
|
export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
|
|
18
|
-
export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, isTableFixedColumnWidthsOptionEnabled: boolean, isCommentEditor: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: (
|
|
18
|
+
export declare const changeColumnWidthByStepWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null) => (stepSize: number, getEditorContainerWidth: GetEditorContainerWidth, isTableScalingEnabled: boolean, isTableFixedColumnWidthsOptionEnabled: boolean, isCommentEditor: boolean, inputMethod: INPUT_METHOD.SHORTCUT, ariaNotify?: (message: string) => void, getIntl?: () => IntlShape) => Command;
|
|
19
19
|
export declare const insertColumnWithAnalytics: (api: PluginInjectionAPI | undefined | null, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, position: number) => Command;
|
|
20
20
|
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;
|
|
21
21
|
export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TABLE_CONTEXT_MENU, rect: Rect) => Command;
|
|
@@ -2,7 +2,7 @@ import type { IntlShape } from 'react-intl-next/src/types';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Direction } from '@atlaskit/editor-tables/types';
|
|
5
|
-
export declare const goToNextCell: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (
|
|
5
|
+
export declare const goToNextCell: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string) => void, getIntl?: () => IntlShape) => (direction: Direction) => Command;
|
|
6
6
|
/**
|
|
7
7
|
* Moves the cursor vertically from a NodeSelection within a table cell.
|
|
8
8
|
* - If content exists above/below within the cell, lets ProseMirror handle it.
|
|
@@ -13,10 +13,10 @@ export declare const triggerUnlessTableHeader: (command: Command) => Command;
|
|
|
13
13
|
export declare const transformSliceRemoveCellBackgroundColor: (slice: Slice, schema: Schema) => Slice;
|
|
14
14
|
export declare const transformSliceToAddTableHeaders: (slice: Slice, schema: Schema) => Slice;
|
|
15
15
|
export declare const transformSliceToRemoveColumnsWidths: (slice: Slice, schema: Schema) => Slice;
|
|
16
|
-
export declare const countCellsInSlice: (slice: Slice, schema: Schema, type?:
|
|
16
|
+
export declare const countCellsInSlice: (slice: Slice, schema: Schema, type?: "row" | "column") => number;
|
|
17
17
|
export declare const getTableSelectionType: (selection: Selection) => "row" | "column" | undefined;
|
|
18
18
|
export declare const getTableElementMoveTypeBySlice: (slice: Slice, state: EditorState) => "row" | "column" | undefined;
|
|
19
|
-
export declare const isInsideFirstCellOfRowOrColumn: (selection: Selection, type?:
|
|
19
|
+
export declare const isInsideFirstCellOfRowOrColumn: (selection: Selection, type?: "row" | "column") => boolean;
|
|
20
20
|
export declare const deleteTable: Command;
|
|
21
21
|
export declare const deleteTableIfSelected: Command;
|
|
22
22
|
export declare const convertFirstRowToHeader: (schema: Schema) => (tr: Transaction) => Transaction;
|
|
@@ -2,9 +2,9 @@ import { type IntlShape } from 'react-intl-next/src/types';
|
|
|
2
2
|
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessibility-utils';
|
|
4
4
|
import type tablePlugin from '../../tablePlugin';
|
|
5
|
-
export declare const arrowLeftFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
6
|
-
export declare const arrowRightFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
7
|
-
export declare const selectColumns: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
8
|
-
export declare const selectRows: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
9
|
-
export declare const shiftArrowUpFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
10
|
-
export declare const modASelectTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
5
|
+
export declare const arrowLeftFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
|
|
6
|
+
export declare const arrowRightFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
|
|
7
|
+
export declare const selectColumns: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
|
|
8
|
+
export declare const selectRows: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
|
|
9
|
+
export declare const shiftArrowUpFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
|
|
10
|
+
export declare const modASelectTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
|
|
@@ -6,6 +6,6 @@ import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessib
|
|
|
6
6
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { DraggableData, DraggableType } from '../../types';
|
|
8
8
|
export declare const clearDropTargetWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP, sourceType: DraggableType, sourceIndexes: number[] | undefined, status: TABLE_STATUS.CANCELLED | TABLE_STATUS.INVALID, tr?: Transaction) => Command;
|
|
9
|
-
export declare const moveSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (
|
|
10
|
-
export declare const moveSourceWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (
|
|
11
|
-
export declare const cloneSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection:
|
|
9
|
+
export declare const moveSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, tr?: Transaction) => Command;
|
|
10
|
+
export declare const moveSourceWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (sourceType: DraggableType, direction: DraggableData["direction"]) => Command;
|
|
11
|
+
export declare const cloneSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: "start" | "end", tr?: Transaction) => Command;
|
|
@@ -6,4 +6,4 @@ export declare const setDropTarget: (type: DropTargetType, index: number, hasMer
|
|
|
6
6
|
export declare const clearDropTarget: (tr?: Transaction) => import("@atlaskit/editor-common/types").Command;
|
|
7
7
|
export declare const moveSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, tr?: Transaction) => import("@atlaskit/editor-common/types").Command;
|
|
8
8
|
export declare const toggleDragMenu: (isDragMenuOpen: boolean | undefined, direction?: TableDirection, index?: number, trigger?: TriggerType) => import("@atlaskit/editor-common/types").Command;
|
|
9
|
-
export declare const cloneSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection:
|
|
9
|
+
export declare const cloneSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: "start" | "end", tr?: Transaction) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").DragAndDropPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").DragAndDropPluginState)) => import("prosemirror-state").SafeStateField<import("./types").DragAndDropPluginState>, createCommand: <A = import("./actions").DragAndDropPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (
|
|
1
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").DragAndDropPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").DragAndDropPluginState)) => import("prosemirror-state").SafeStateField<import("./types").DragAndDropPluginState>, createCommand: <A = import("./actions").DragAndDropPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").DragAndDropPluginState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("../types").TablePluginState | ((state: import("prosemirror-state").EditorState) => import("../types").TablePluginState)) => import("prosemirror-state").SafeStateField<import("../types").TablePluginState>, createCommand: <A = import("../types").TablePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (
|
|
1
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("../types").TablePluginState | ((state: import("prosemirror-state").EditorState) => import("../types").TablePluginState)) => import("prosemirror-state").SafeStateField<import("../types").TablePluginState>, createCommand: <A = import("../types").TablePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("../types").TablePluginState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { StickyPluginAction, StickyPluginState } from './types';
|
|
2
|
-
declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState) => StickyPluginState)) => import("prosemirror-state").SafeStateField<StickyPluginState>, createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (
|
|
2
|
+
declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState) => StickyPluginState)) => import("prosemirror-state").SafeStateField<StickyPluginState>, createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command;
|
|
3
3
|
export { createPluginState, createCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ColumnResizingPluginState } from '../../types';
|
|
2
|
-
export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (
|
|
2
|
+
export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command;
|
|
3
3
|
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState) => ColumnResizingPluginState)) => import("prosemirror-state").SafeStateField<ColumnResizingPluginState>;
|
|
4
4
|
export declare const getPluginState: (state: import("prosemirror-state").EditorState) => ColumnResizingPluginState;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const createTableWithWidth: ({ isTableScalingEnabled, isTableAlignmentEnabled, isFullWidthModeEnabled, isCommentEditor, isChromelessEditor, isTableResizingEnabled, isNestedTable, createTableProps, }: {
|
|
3
|
-
isTableScalingEnabled?: boolean
|
|
4
|
-
isTableAlignmentEnabled?: boolean
|
|
5
|
-
isFullWidthModeEnabled?: boolean
|
|
6
|
-
isCommentEditor?: boolean
|
|
7
|
-
isChromelessEditor?: boolean
|
|
8
|
-
isTableResizingEnabled?: boolean
|
|
9
|
-
isNestedTable?: boolean
|
|
3
|
+
isTableScalingEnabled?: boolean;
|
|
4
|
+
isTableAlignmentEnabled?: boolean;
|
|
5
|
+
isFullWidthModeEnabled?: boolean;
|
|
6
|
+
isCommentEditor?: boolean;
|
|
7
|
+
isChromelessEditor?: boolean;
|
|
8
|
+
isTableResizingEnabled?: boolean;
|
|
9
|
+
isNestedTable?: boolean;
|
|
10
10
|
createTableProps?: {
|
|
11
|
-
rowsCount?: number
|
|
12
|
-
colsCount?: number
|
|
13
|
-
}
|
|
11
|
+
rowsCount?: number;
|
|
12
|
+
colsCount?: number;
|
|
13
|
+
};
|
|
14
14
|
}) => (schema: Schema) => import("prosemirror-model").Node;
|
|
@@ -9,14 +9,14 @@ import { TableDecorations } from '../../types';
|
|
|
9
9
|
export declare const findColumnControlSelectedDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
10
10
|
export declare const findControlsHoverDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
11
11
|
export declare const createCellHoverDecoration: (cells: Cell[]) => Decoration[];
|
|
12
|
-
export declare const createControlsHoverDecoration: (cells: Cell[], type:
|
|
12
|
+
export declare const createControlsHoverDecoration: (cells: Cell[], type: "row" | "column" | "table", tr: Transaction | ReadonlyTransaction, isDragAndDropEnable: boolean | undefined, hoveredIndexes: number[], danger?: boolean, selected?: boolean) => Decoration[];
|
|
13
13
|
export declare const createColumnSelectedDecoration: (tr: Transaction | ReadonlyTransaction) => Decoration[];
|
|
14
14
|
export declare const createColumnControlsDecoration: (selection: Selection) => Decoration[];
|
|
15
15
|
export declare const updateDecorations: (node: PmNode, decorationSet: DecorationSet, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
|
16
|
-
export declare const createResizeHandleDecoration: (tr: Transaction | ReadonlyTransaction, rowIndexTarget: number, columnEndIndexTarget: Omit<CellColumnPositioning,
|
|
16
|
+
export declare const createResizeHandleDecoration: (tr: Transaction | ReadonlyTransaction, rowIndexTarget: number, columnEndIndexTarget: Omit<CellColumnPositioning, "left">, includeTooltip: boolean | undefined, getIntl: () => IntlShape, nodeViewPortalProviderAPI: PortalProviderAPI) => [
|
|
17
17
|
Decoration[],
|
|
18
18
|
Decoration[]
|
|
19
19
|
];
|
|
20
|
-
export declare const createColumnLineResize: (selection: Selection, cellColumnPositioning: Omit<CellColumnPositioning,
|
|
20
|
+
export declare const createColumnLineResize: (selection: Selection, cellColumnPositioning: Omit<CellColumnPositioning, "left">, isDragAndDropEnabled?: boolean) => Decoration[];
|
|
21
21
|
export declare const createColumnInsertLine: (columnIndex: number, selection: Selection, hasMergedCells: boolean) => Decoration[];
|
|
22
22
|
export declare const createRowInsertLine: (rowIndex: number, selection: Selection, hasMergedCells: boolean) => Decoration[];
|
|
@@ -23,8 +23,8 @@ export declare const isDragCornerButton: (node: HTMLElement | null) => boolean;
|
|
|
23
23
|
* @param gapInPixels
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
|
-
export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, offsetX: number, gapInPixels?: number) =>
|
|
27
|
-
export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) =>
|
|
26
|
+
export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, offsetX: number, gapInPixels?: number) => "left" | "right" | null;
|
|
27
|
+
export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => "top" | "bottom" | null;
|
|
28
28
|
export declare const hasResizeHandler: ({ columnEndIndexTarget, target, }: {
|
|
29
29
|
columnEndIndexTarget: number;
|
|
30
30
|
target: HTMLElement;
|
|
@@ -7,8 +7,8 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
7
7
|
import type { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
|
|
8
8
|
import type { NewIconProps } from '@atlaskit/icon/types';
|
|
9
9
|
import type { DraggableData, DraggableType, PluginInjectionAPI, TableDirection } from '../../types';
|
|
10
|
-
export declare const getTargetIndex: (selectedIndexes: number[], direction: DraggableData[
|
|
11
|
-
export declare const canMove: (sourceType: DraggableType, direction: DraggableData[
|
|
10
|
+
export declare const getTargetIndex: (selectedIndexes: number[], direction: DraggableData["direction"]) => number;
|
|
11
|
+
export declare const canMove: (sourceType: DraggableType, direction: DraggableData["direction"], totalItemsOfSourceTypeCount: number, selection: Selection, selectionRect?: Rect) => boolean;
|
|
12
12
|
export type DragMenuOptionIdType = 'add_row_above' | 'add_row_below' | 'add_column_left' | 'add_column_right' | 'distribute_columns' | 'clear_cells' | 'delete_row' | 'delete_column' | 'move_column_left' | 'move_column_right' | 'move_row_up' | 'move_row_down' | 'sort_column_asc' | 'sort_column_desc';
|
|
13
13
|
export interface DragMenuConfig extends Omit<DropdownOptionT<Command>, 'icon'> {
|
|
14
14
|
id: DragMenuOptionIdType;
|
|
@@ -16,4 +16,4 @@ export interface DragMenuConfig extends Omit<DropdownOptionT<Command>, 'icon'> {
|
|
|
16
16
|
iconFallback?: React.ComponentType<React.PropsWithChildren<NewIconProps>>;
|
|
17
17
|
keymap?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, hasMergedCellsInTable: boolean, editorView: EditorView, api: PluginInjectionAPI | undefined | null, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, ariaNotifyPlugin?: (
|
|
19
|
+
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, hasMergedCellsInTable: boolean, editorView: EditorView, api: PluginInjectionAPI | undefined | null, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, ariaNotifyPlugin?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, isCommentEditor?: boolean) => DragMenuConfig[];
|
|
@@ -3,7 +3,8 @@ import { TableMap } from '@atlaskit/editor-tables';
|
|
|
3
3
|
type MergeType = 'row' | 'column';
|
|
4
4
|
export declare const hasMergedCellsInBetween: (indexes: number[], type: MergeType) => (selection: Selection) => boolean;
|
|
5
5
|
export declare const hasMergedCellsWithColumnNextToColumnIndex: (colIndex: number, selection: Selection) => boolean;
|
|
6
|
-
export declare const hasMergedCellsWithRowNextToRowIndex: (rowIndex: number,
|
|
6
|
+
export declare const hasMergedCellsWithRowNextToRowIndex: (rowIndex: number, // logical row index in the table. It starts at 0 and goes up to tableMap.height - 1.
|
|
7
|
+
selection: Selection) => boolean;
|
|
7
8
|
export declare const hasMergedCellsInSelection: (indexes: number[], type: MergeType) => (selection: Selection) => boolean;
|
|
8
9
|
/**
|
|
9
10
|
* this check the selection has merged cells with previous/next col or row.
|
|
@@ -13,7 +14,7 @@ export declare const hasMergedCellsInSelection: (indexes: number[], type: MergeT
|
|
|
13
14
|
* @param direction - check selection is selected by row or column
|
|
14
15
|
* @returns boolean
|
|
15
16
|
*/
|
|
16
|
-
export declare const checkEdgeHasMergedCells: (indexes: number[], tableMap: TableMap, direction:
|
|
17
|
+
export declare const checkEdgeHasMergedCells: (indexes: number[], tableMap: TableMap, direction: "row" | "column") => boolean;
|
|
17
18
|
/**
|
|
18
19
|
* this function will find the duplicate position in the array(table map position array).
|
|
19
20
|
*
|
|
@@ -9,6 +9,7 @@ import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
|
9
9
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
10
10
|
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
11
11
|
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
12
|
+
import type { LimitedModePlugin } from '@atlaskit/editor-plugin-limited-mode';
|
|
12
13
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
13
14
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
14
15
|
import type { PluginConfig, TableSharedState } from './types';
|
|
@@ -42,6 +43,7 @@ export type TablePluginDependencies = [
|
|
|
42
43
|
ContentInsertionPlugin,
|
|
43
44
|
WidthPlugin,
|
|
44
45
|
SelectionPlugin,
|
|
46
|
+
OptionalPlugin<LimitedModePlugin>,
|
|
45
47
|
OptionalPlugin<GuidelinePlugin>,
|
|
46
48
|
OptionalPlugin<BatchAttributeUpdatesPlugin>,
|
|
47
49
|
OptionalPlugin<AccessibilityUtilsPlugin>,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { MouseEventHandler } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
6
|
import type { TriggerType } from '../../pm-plugins/drag-and-drop/types';
|
|
7
|
+
import type { TablePlugin } from '../../tablePluginType';
|
|
6
8
|
import type { CellHoverMeta, TableDirection } from '../../types';
|
|
7
9
|
export type DragHandleAppearance = 'default' | 'selected' | 'disabled' | 'danger' | 'placeholder';
|
|
8
10
|
type DragHandleProps = {
|
|
@@ -27,22 +29,10 @@ export declare const DragHandle: React.FC<import("react-intl-next").WithIntlProp
|
|
|
27
29
|
WrappedComponent: React.ComponentType<DragHandleProps & WrappedComponentProps>;
|
|
28
30
|
};
|
|
29
31
|
export declare const DragHandleWithSharedState: React.FC<import("react-intl-next").WithIntlProps<DragHandleProps & {
|
|
30
|
-
api?:
|
|
31
|
-
pluginConfiguration: import("../../tablePluginType").TablePluginOptions | undefined;
|
|
32
|
-
actions: import("../../tablePluginType").TablePluginActions;
|
|
33
|
-
sharedState?: import("../../types").TableSharedState | undefined;
|
|
34
|
-
commands: import("../../tablePluginType").TablePluginCommands;
|
|
35
|
-
dependencies: import("../../tablePluginType").TablePluginDependencies;
|
|
36
|
-
}> | undefined;
|
|
32
|
+
api?: ExtractInjectionAPI<TablePlugin>;
|
|
37
33
|
} & WrappedComponentProps>> & {
|
|
38
34
|
WrappedComponent: React.ComponentType<DragHandleProps & {
|
|
39
|
-
api?:
|
|
40
|
-
pluginConfiguration: import("../../tablePluginType").TablePluginOptions | undefined;
|
|
41
|
-
actions: import("../../tablePluginType").TablePluginActions;
|
|
42
|
-
sharedState?: import("../../types").TableSharedState | undefined;
|
|
43
|
-
commands: import("../../tablePluginType").TablePluginCommands;
|
|
44
|
-
dependencies: import("../../tablePluginType").TablePluginDependencies;
|
|
45
|
-
}> | undefined;
|
|
35
|
+
api?: ExtractInjectionAPI<TablePlugin>;
|
|
46
36
|
} & WrappedComponentProps>;
|
|
47
37
|
};
|
|
48
38
|
export {};
|
|
@@ -21,12 +21,6 @@ interface ColumnControlsProps {
|
|
|
21
21
|
getScrollOffset?: () => number;
|
|
22
22
|
}
|
|
23
23
|
export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, stickyTop, localId, isInDanger, rowHeights, colWidths, isTableHovered, tableContainerWidth, isNumberColumnEnabled, isDragging, getScrollOffset, api, }: ColumnControlsProps & {
|
|
24
|
-
api?:
|
|
25
|
-
pluginConfiguration: import("../../../tablePluginType").TablePluginOptions | undefined;
|
|
26
|
-
actions: import("../../../tablePluginType").TablePluginActions;
|
|
27
|
-
sharedState?: import("../../../types").TableSharedState | undefined;
|
|
28
|
-
commands: import("../../../tablePluginType").TablePluginCommands;
|
|
29
|
-
dependencies: import("../../../tablePluginType").TablePluginDependencies;
|
|
30
|
-
}> | undefined;
|
|
24
|
+
api?: ExtractInjectionAPI<TablePlugin>;
|
|
31
25
|
}) => React.JSX.Element;
|
|
32
26
|
export {};
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { TablePlugin } from '../../../tablePluginType';
|
|
3
5
|
import type { CornerControlProps } from './types';
|
|
4
6
|
export declare const DragCornerControlsWithSelection: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps & {
|
|
5
|
-
api?:
|
|
6
|
-
pluginConfiguration: import("../../../tablePluginType").TablePluginOptions | undefined;
|
|
7
|
-
actions: import("../../../tablePluginType").TablePluginActions;
|
|
8
|
-
sharedState?: import("../../../types").TableSharedState | undefined;
|
|
9
|
-
commands: import("../../../tablePluginType").TablePluginCommands;
|
|
10
|
-
dependencies: import("../../../tablePluginType").TablePluginDependencies;
|
|
11
|
-
}> | undefined;
|
|
7
|
+
api?: ExtractInjectionAPI<TablePlugin>;
|
|
12
8
|
}>> & {
|
|
13
9
|
WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps & {
|
|
14
|
-
api?:
|
|
15
|
-
pluginConfiguration: import("../../../tablePluginType").TablePluginOptions | undefined;
|
|
16
|
-
actions: import("../../../tablePluginType").TablePluginActions;
|
|
17
|
-
sharedState?: import("../../../types").TableSharedState | undefined;
|
|
18
|
-
commands: import("../../../tablePluginType").TablePluginCommands;
|
|
19
|
-
dependencies: import("../../../tablePluginType").TablePluginDependencies;
|
|
20
|
-
}> | undefined;
|
|
10
|
+
api?: ExtractInjectionAPI<TablePlugin>;
|
|
21
11
|
}>;
|
|
22
12
|
};
|
|
23
13
|
export declare const DragCornerControls: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps>> & {
|
|
@@ -23,5 +23,5 @@ type DragControlsProps = {
|
|
|
23
23
|
selection?: Selection;
|
|
24
24
|
};
|
|
25
25
|
export declare const DragControls: ({ tableRef, tableNode, tableWidth, hoveredCell, tableActive, editorView, isInDanger, isResizing, isTableHovered, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, selection, }: DragControlsProps) => React.JSX.Element | null;
|
|
26
|
-
export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps,
|
|
26
|
+
export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps, "selection">) => React.JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -31,12 +31,6 @@ interface TableFloatingControlsProps {
|
|
|
31
31
|
isChromelessEditor?: boolean;
|
|
32
32
|
}
|
|
33
33
|
export declare const TableFloatingControls: ({ editorView, tableRef, tableNode, isInDanger, isResizing, isNumberColumnEnabled, isHeaderRowEnabled, isHeaderColumnEnabled, tableActive, hasHeaderRow, hoveredRows, stickyHeader, isDragAndDropEnabled, hoveredCell, isTableHovered, tableWrapperWidth, api, isChromelessEditor, }: TableFloatingControlsProps & {
|
|
34
|
-
api?:
|
|
35
|
-
pluginConfiguration: import("../../tablePluginType").TablePluginOptions | undefined;
|
|
36
|
-
actions: import("../../tablePluginType").TablePluginActions;
|
|
37
|
-
sharedState?: import("../../types").TableSharedState | undefined;
|
|
38
|
-
commands: import("../../tablePluginType").TablePluginCommands;
|
|
39
|
-
dependencies: import("../../tablePluginType").TablePluginDependencies;
|
|
40
|
-
}> | undefined;
|
|
34
|
+
api?: ExtractInjectionAPI<TablePlugin>;
|
|
41
35
|
}) => React.JSX.Element | null;
|
|
42
36
|
export default TableFloatingControls;
|
|
@@ -7,12 +7,6 @@ import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
|
7
7
|
import type { PluginInjectionAPI } from '../types';
|
|
8
8
|
export declare const GlobalStylesWrapper: ({ featureFlags, isDragAndDropEnabledOption, api, }: {
|
|
9
9
|
featureFlags: FeatureFlags | undefined;
|
|
10
|
-
isDragAndDropEnabledOption?: boolean
|
|
11
|
-
api?:
|
|
12
|
-
pluginConfiguration: import("..").TablePluginOptions | undefined;
|
|
13
|
-
actions: import("..").TablePluginActions;
|
|
14
|
-
sharedState?: import("../types").TableSharedState | undefined;
|
|
15
|
-
commands: import("..").TablePluginCommands;
|
|
16
|
-
dependencies: import("..").TablePluginDependencies;
|
|
17
|
-
}> | undefined;
|
|
10
|
+
isDragAndDropEnabledOption?: boolean;
|
|
11
|
+
api?: PluginInjectionAPI;
|
|
18
12
|
}) => jsx.JSX.Element;
|
|
@@ -18,5 +18,5 @@ type Options = {
|
|
|
18
18
|
* @returns
|
|
19
19
|
* @example
|
|
20
20
|
*/
|
|
21
|
-
export declare const useInternalTablePluginStateSelector: <K extends
|
|
21
|
+
export declare const useInternalTablePluginStateSelector: <K extends keyof TableSharedStateInternal>(api: ExtractInjectionAPI<TablePlugin> | undefined, key: K, options?: Options) => TableSharedStateInternal[K] | undefined;
|
|
22
22
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.15",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,16 +37,17 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^3.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^3.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "6.1.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "6.1.6",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^3.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^5.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-limited-mode": "^0.0.0",
|
|
43
44
|
"@atlaskit/editor-plugin-selection": "^3.0.0",
|
|
44
45
|
"@atlaskit/editor-plugin-width": "^4.0.0",
|
|
45
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
46
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
47
|
+
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
47
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
48
|
-
"@atlaskit/icon": "^27.
|
|
49
|
-
"@atlaskit/menu": "^8.
|
|
49
|
+
"@atlaskit/icon": "^27.12.0",
|
|
50
|
+
"@atlaskit/menu": "^8.3.0",
|
|
50
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
52
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
52
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"@atlaskit/primitives": "^14.11.0",
|
|
55
56
|
"@atlaskit/react-ufo": "^4.2.0",
|
|
56
57
|
"@atlaskit/theme": "^19.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
58
|
+
"@atlaskit/tmp-editor-statsig": "^9.28.0",
|
|
58
59
|
"@atlaskit/toggle": "^15.1.0",
|
|
59
60
|
"@atlaskit/tokens": "^6.0.0",
|
|
60
61
|
"@atlaskit/tooltip": "^20.4.0",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"uuid": "^3.1.0"
|
|
68
69
|
},
|
|
69
70
|
"peerDependencies": {
|
|
70
|
-
"@atlaskit/editor-common": "^107.
|
|
71
|
+
"@atlaskit/editor-common": "^107.23.0",
|
|
71
72
|
"react": "^18.2.0",
|
|
72
73
|
"react-dom": "^18.2.0",
|
|
73
74
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -133,9 +134,6 @@
|
|
|
133
134
|
"platform_editor_nested_tables_view_mode_sort": {
|
|
134
135
|
"type": "boolean"
|
|
135
136
|
},
|
|
136
|
-
"platform_editor_nested_tables_number_column_fixes": {
|
|
137
|
-
"type": "boolean"
|
|
138
|
-
},
|
|
139
137
|
"disable-sticky-scrollbar-for-nested-tables": {
|
|
140
138
|
"type": "boolean"
|
|
141
139
|
},
|