@atlaskit/editor-plugin-table 12.2.7 → 12.3.1
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/dist/cjs/pm-plugins/view-mode-sort/index.js +1 -3
- package/dist/es2019/pm-plugins/view-mode-sort/index.js +1 -3
- package/dist/esm/pm-plugins/view-mode-sort/index.js +1 -3
- package/dist/types/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types/nodeviews/TableComponent.d.ts +21 -21
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +9 -9
- package/dist/types/nodeviews/TableContainer.d.ts +20 -20
- package/dist/types/nodeviews/TableResizer.d.ts +16 -16
- package/dist/types/nodeviews/TableRow.d.ts +1 -1
- package/dist/types/nodeviews/table-node-views.d.ts +4 -4
- package/dist/types/nodeviews/table.d.ts +2 -2
- package/dist/types/nodeviews/toDOM.d.ts +4 -4
- package/dist/types/nodeviews/types.d.ts +12 -12
- package/dist/types/pm-plugins/analytics/actions.d.ts +2 -2
- package/dist/types/pm-plugins/analytics/types.d.ts +2 -2
- package/dist/types/pm-plugins/commands/column-resize.d.ts +6 -6
- package/dist/types/pm-plugins/commands/insert.d.ts +7 -7
- package/dist/types/pm-plugins/drag-and-drop/actions.d.ts +4 -4
- package/dist/types/pm-plugins/drag-and-drop/types.d.ts +3 -3
- package/dist/types/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
- package/dist/types/pm-plugins/sticky-headers/types.d.ts +2 -2
- package/dist/types/pm-plugins/table-resizing/commands.d.ts +3 -3
- package/dist/types/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
- package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +6 -6
- package/dist/types/pm-plugins/table-resizing/utils/scale-table.d.ts +6 -6
- package/dist/types/pm-plugins/table-resizing/utils/types.d.ts +8 -8
- package/dist/types/pm-plugins/utils/analytics.d.ts +2 -2
- package/dist/types/pm-plugins/utils/collapse.d.ts +3 -3
- package/dist/types/pm-plugins/utils/column-controls.d.ts +1 -1
- package/dist/types/pm-plugins/utils/create.d.ts +8 -8
- package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types/pm-plugins/utils/drag-menu.d.ts +1 -1
- package/dist/types/pm-plugins/utils/row-controls.d.ts +2 -2
- package/dist/types/pm-plugins/utils/snapping.d.ts +1 -1
- package/dist/types/pm-plugins/view-mode-sort/index.d.ts +1 -1
- package/dist/types/pm-plugins/view-mode-sort/types.d.ts +2 -2
- package/dist/types/tablePluginType.d.ts +10 -10
- package/dist/types/types/index.d.ts +99 -99
- package/dist/types/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types/ui/ContentComponent.d.ts +5 -5
- package/dist/types/ui/DragHandle/HandleIconComponent.d.ts +1 -1
- package/dist/types/ui/DragHandle/index.d.ts +11 -11
- package/dist/types/ui/DragPreview/index.d.ts +1 -1
- package/dist/types/ui/FloatingContextualButton/FixedButton.d.ts +2 -2
- package/dist/types/ui/FloatingContextualButton/index.d.ts +7 -7
- package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +10 -10
- package/dist/types/ui/FloatingContextualMenu/index.d.ts +8 -8
- package/dist/types/ui/FloatingDeleteButton/DeleteButton.d.ts +2 -2
- package/dist/types/ui/FloatingDeleteButton/getPopUpOptions.d.ts +1 -1
- package/dist/types/ui/FloatingDeleteButton/index.d.ts +9 -9
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +15 -15
- package/dist/types/ui/FloatingDragMenu/DropdownMenu.d.ts +14 -14
- package/dist/types/ui/FloatingDragMenu/index.d.ts +14 -14
- package/dist/types/ui/FloatingInsertButton/InsertButton.d.ts +3 -3
- package/dist/types/ui/FloatingInsertButton/index.d.ts +11 -11
- package/dist/types/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +4 -4
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -10
- package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
- package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +4 -4
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +10 -10
- package/dist/types/ui/TableFloatingControls/CornerControls/types.d.ts +3 -3
- package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +7 -7
- package/dist/types/ui/TableFloatingControls/NumberColumn/index.d.ts +7 -7
- package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +5 -5
- package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +8 -8
- package/dist/types/ui/TableFloatingControls/index.d.ts +14 -14
- package/dist/types/ui/global-styles.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +21 -21
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +9 -9
- package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +20 -20
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +16 -16
- package/dist/types-ts4.5/nodeviews/TableRow.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/table-node-views.d.ts +4 -4
- package/dist/types-ts4.5/nodeviews/table.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/toDOM.d.ts +4 -4
- package/dist/types-ts4.5/nodeviews/types.d.ts +12 -12
- package/dist/types-ts4.5/pm-plugins/analytics/actions.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/analytics/types.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/commands/insert.d.ts +7 -7
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/actions.d.ts +4 -4
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/types.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/sticky-headers/types.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/table-resizing/commands.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/types.d.ts +8 -8
- package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/collapse.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/column-controls.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +8 -8
- 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 +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/row-controls.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/snapping.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/view-mode-sort/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/view-mode-sort/types.d.ts +2 -2
- package/dist/types-ts4.5/tablePluginType.d.ts +10 -10
- package/dist/types-ts4.5/types/index.d.ts +99 -99
- package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentComponent.d.ts +5 -5
- package/dist/types-ts4.5/ui/DragHandle/HandleIconComponent.d.ts +1 -1
- package/dist/types-ts4.5/ui/DragHandle/index.d.ts +11 -11
- package/dist/types-ts4.5/ui/DragPreview/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingContextualButton/FixedButton.d.ts +2 -2
- package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +7 -7
- package/dist/types-ts4.5/ui/FloatingContextualMenu/ContextualMenu.d.ts +10 -10
- package/dist/types-ts4.5/ui/FloatingContextualMenu/index.d.ts +8 -8
- package/dist/types-ts4.5/ui/FloatingDeleteButton/DeleteButton.d.ts +2 -2
- package/dist/types-ts4.5/ui/FloatingDeleteButton/getPopUpOptions.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDeleteButton/index.d.ts +9 -9
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +15 -15
- package/dist/types-ts4.5/ui/FloatingDragMenu/DropdownMenu.d.ts +14 -14
- package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +14 -14
- package/dist/types-ts4.5/ui/FloatingInsertButton/InsertButton.d.ts +3 -3
- package/dist/types-ts4.5/ui/FloatingInsertButton/index.d.ts +11 -11
- package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +4 -4
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -10
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +4 -4
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +10 -10
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/types.d.ts +3 -3
- package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +7 -7
- package/dist/types-ts4.5/ui/TableFloatingControls/NumberColumn/index.d.ts +7 -7
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +5 -5
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +8 -8
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +14 -14
- package/dist/types-ts4.5/ui/global-styles.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 12.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 12.3.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`2a4fd9178e46c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2a4fd9178e46c) -
|
|
16
|
+
Debounced sort button on table
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 12.2.7
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -139,9 +139,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, nodeViewPor
|
|
|
139
139
|
onKeyDown: function onKeyDown() {},
|
|
140
140
|
api: api
|
|
141
141
|
}));
|
|
142
|
-
}, element, decorationRenderKey
|
|
143
|
-
// @portal-render-immediately
|
|
144
|
-
true);
|
|
142
|
+
}, element, decorationRenderKey);
|
|
145
143
|
return element;
|
|
146
144
|
}, {
|
|
147
145
|
destroy: function destroy(node) {
|
|
@@ -111,9 +111,7 @@ export const createPlugin = (api, nodeViewPortalProviderAPI) => {
|
|
|
111
111
|
onClick: () => {},
|
|
112
112
|
onKeyDown: () => {},
|
|
113
113
|
api
|
|
114
|
-
})), element, decorationRenderKey
|
|
115
|
-
// @portal-render-immediately
|
|
116
|
-
true);
|
|
114
|
+
})), element, decorationRenderKey);
|
|
117
115
|
return element;
|
|
118
116
|
}, {
|
|
119
117
|
destroy: node => {
|
|
@@ -134,9 +134,7 @@ export var createPlugin = function createPlugin(api, nodeViewPortalProviderAPI)
|
|
|
134
134
|
onKeyDown: function onKeyDown() {},
|
|
135
135
|
api: api
|
|
136
136
|
}));
|
|
137
|
-
}, element, decorationRenderKey
|
|
138
|
-
// @portal-render-immediately
|
|
139
|
-
true);
|
|
137
|
+
}, element, decorationRenderKey);
|
|
140
138
|
return element;
|
|
141
139
|
}, {
|
|
142
140
|
destroy: function destroy(node) {
|
|
@@ -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;
|
|
7
6
|
getScrollOffset: () => number;
|
|
8
7
|
getTableWrapperWidth: () => number;
|
|
8
|
+
node?: PMNode;
|
|
9
9
|
}) => React.JSX.Element | null;
|
|
@@ -10,36 +10,36 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
10
10
|
import type { CellHoverMeta, PluginInjectionAPI } from '../types';
|
|
11
11
|
import type { TableOptions } from './types';
|
|
12
12
|
interface ComponentProps {
|
|
13
|
-
view: EditorView;
|
|
14
|
-
getNode: () => PmNode;
|
|
15
13
|
allowColumnResizing?: boolean;
|
|
16
|
-
eventDispatcher: EventDispatcher;
|
|
17
|
-
getPos: () => number | undefined;
|
|
18
|
-
options?: TableOptions;
|
|
19
|
-
contentDOM: (node: HTMLElement | null) => void;
|
|
20
|
-
containerWidth: EditorContainerWidth;
|
|
21
14
|
allowControls?: boolean;
|
|
22
|
-
allowTableResizing?: boolean;
|
|
23
15
|
allowTableAlignment?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
isDragAndDropEnabled?: boolean;
|
|
28
|
-
isTableScalingEnabled?: boolean;
|
|
29
|
-
tableActive: boolean;
|
|
30
|
-
ordering?: TableColumnOrdering;
|
|
31
|
-
isResizing?: boolean;
|
|
32
|
-
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
16
|
+
allowTableResizing?: boolean;
|
|
17
|
+
containerWidth: EditorContainerWidth;
|
|
18
|
+
contentDOM: (node: HTMLElement | null) => void;
|
|
33
19
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
34
|
-
|
|
20
|
+
eventDispatcher: EventDispatcher;
|
|
21
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
22
|
+
getNode: () => PmNode;
|
|
23
|
+
getPos: () => number | undefined;
|
|
24
|
+
hoveredCell?: CellHoverMeta;
|
|
25
|
+
hoveredRows?: number[];
|
|
35
26
|
intl: IntlShape;
|
|
27
|
+
isDragAndDropEnabled?: boolean;
|
|
28
|
+
isHeaderColumnEnabled: boolean;
|
|
29
|
+
isHeaderRowEnabled: boolean;
|
|
36
30
|
isInDanger?: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
isMediaFullscreen?: boolean;
|
|
32
|
+
isResizing?: boolean;
|
|
39
33
|
isTableHovered?: boolean;
|
|
34
|
+
isTableScalingEnabled?: boolean;
|
|
40
35
|
isWholeTableInDanger?: boolean;
|
|
41
|
-
selection?: Selection;
|
|
42
36
|
limitedMode?: boolean;
|
|
37
|
+
options?: TableOptions;
|
|
38
|
+
ordering?: TableColumnOrdering;
|
|
39
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
40
|
+
selection?: Selection;
|
|
41
|
+
tableActive: boolean;
|
|
42
|
+
view: EditorView;
|
|
43
43
|
}
|
|
44
44
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ComponentProps>> & {
|
|
45
45
|
WrappedComponent: React.ComponentType<ComponentProps>;
|
|
@@ -8,19 +8,19 @@ import type { PluginInjectionAPI } from '../types';
|
|
|
8
8
|
import type { TableOptions } from './types';
|
|
9
9
|
type ForwardRef = (node: HTMLElement | null) => any;
|
|
10
10
|
type TableComponentWithSharedStateProps = {
|
|
11
|
-
view: EditorView;
|
|
12
|
-
options?: TableOptions;
|
|
13
|
-
getNode: () => PmNode;
|
|
14
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
15
|
-
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
16
|
-
api?: PluginInjectionAPI;
|
|
17
|
-
eventDispatcher: EventDispatcher;
|
|
18
|
-
forwardRef: ForwardRef;
|
|
19
|
-
getPos: getPosHandlerNode;
|
|
20
11
|
allowColumnResizing?: boolean;
|
|
21
12
|
allowControls?: boolean;
|
|
22
13
|
allowTableAlignment?: boolean;
|
|
23
14
|
allowTableResizing?: boolean;
|
|
15
|
+
api?: PluginInjectionAPI;
|
|
16
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
17
|
+
eventDispatcher: EventDispatcher;
|
|
18
|
+
forwardRef: ForwardRef;
|
|
19
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
20
|
+
getNode: () => PmNode;
|
|
21
|
+
getPos: getPosHandlerNode;
|
|
22
|
+
options?: TableOptions;
|
|
23
|
+
view: EditorView;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Use useSharedPluginState to control re-renders from plugin dependencies
|
|
@@ -5,48 +5,48 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { PluginInjectionAPI } from '../types';
|
|
7
7
|
type ResizableTableContainerProps = {
|
|
8
|
-
containerWidth: number;
|
|
9
|
-
lineLength: number;
|
|
10
|
-
node: PMNode;
|
|
11
8
|
className: string;
|
|
9
|
+
containerWidth: number;
|
|
12
10
|
editorView: EditorView;
|
|
13
11
|
getPos: () => number | undefined;
|
|
14
|
-
|
|
12
|
+
isChromelessEditor?: boolean;
|
|
13
|
+
isCommentEditor?: boolean;
|
|
15
14
|
isResizing?: boolean;
|
|
16
|
-
|
|
17
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
18
|
-
tableWrapperHeight?: number;
|
|
19
|
-
isWholeTableInDanger?: boolean;
|
|
15
|
+
isTableAlignmentEnabled?: boolean;
|
|
20
16
|
isTableScalingEnabled?: boolean;
|
|
21
17
|
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
22
|
-
|
|
18
|
+
isWholeTableInDanger?: boolean;
|
|
19
|
+
isWindowResized?: boolean;
|
|
20
|
+
lineLength: number;
|
|
21
|
+
node: PMNode;
|
|
22
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
23
23
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
tableRef: HTMLTableElement;
|
|
25
|
+
tableWrapperHeight?: number;
|
|
26
26
|
};
|
|
27
27
|
export declare const ResizableTableContainer: React.FC<ResizableTableContainerProps & {
|
|
28
28
|
children?: React.ReactNode | undefined;
|
|
29
29
|
}>;
|
|
30
30
|
type TableContainerProps = {
|
|
31
|
-
node: PMNode;
|
|
32
31
|
className: string;
|
|
33
32
|
containerWidth: EditorContainerWidth;
|
|
34
33
|
editorView: EditorView;
|
|
35
34
|
getPos: () => number | undefined;
|
|
36
|
-
|
|
35
|
+
isChromelessEditor?: boolean;
|
|
36
|
+
isCommentEditor?: boolean;
|
|
37
37
|
isNested: boolean;
|
|
38
38
|
isResizing?: boolean;
|
|
39
|
-
|
|
40
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
41
|
-
tableWrapperHeight?: number;
|
|
42
|
-
isWholeTableInDanger?: boolean;
|
|
39
|
+
isTableAlignmentEnabled?: boolean;
|
|
43
40
|
isTableResizingEnabled: boolean | undefined;
|
|
44
41
|
isTableScalingEnabled?: boolean;
|
|
45
42
|
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
46
|
-
|
|
43
|
+
isWholeTableInDanger?: boolean;
|
|
44
|
+
isWindowResized?: boolean;
|
|
45
|
+
node: PMNode;
|
|
46
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
47
47
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
tableRef: HTMLTableElement;
|
|
49
|
+
tableWrapperHeight?: number;
|
|
50
50
|
};
|
|
51
51
|
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, isWindowResized, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<TableContainerProps>) => React.JSX.Element;
|
|
52
52
|
export {};
|
|
@@ -7,29 +7,29 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { PluginInjectionAPI } from '../types';
|
|
9
9
|
interface TableResizerProps {
|
|
10
|
-
|
|
11
|
-
maxWidth: number | string;
|
|
10
|
+
attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
|
|
12
11
|
containerWidth: number;
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
displayGapCursor: (toggle: boolean) => boolean;
|
|
14
|
+
displayGuideline: (guideline: GuidelineConfig[]) => boolean;
|
|
15
15
|
editorView: EditorView;
|
|
16
16
|
getPos: () => number | undefined;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
|
|
21
|
-
displayGapCursor: (toggle: boolean) => boolean;
|
|
22
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
17
|
+
isCommentEditor?: boolean;
|
|
18
|
+
isFullWidthModeEnabled?: boolean;
|
|
19
|
+
isTableAlignmentEnabled?: boolean;
|
|
23
20
|
isTableScalingEnabled?: boolean;
|
|
24
21
|
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
25
|
-
isTableAlignmentEnabled?: boolean;
|
|
26
22
|
isWholeTableInDanger?: boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
onResizeStop?: () => void;
|
|
23
|
+
lineLength: number;
|
|
24
|
+
maxWidth: number | string;
|
|
25
|
+
node: PMNode;
|
|
31
26
|
onResizeStart?: () => void;
|
|
32
|
-
|
|
27
|
+
onResizeStop?: () => void;
|
|
28
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
29
|
+
shouldUseIncreasedScalingPercent?: boolean;
|
|
30
|
+
tableRef: HTMLTableElement;
|
|
31
|
+
updateWidth: (width: number) => void;
|
|
32
|
+
width: number;
|
|
33
33
|
}
|
|
34
34
|
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, isCommentEditor, disabled, }: PropsWithChildren<TableResizerProps>) => React.JSX.Element;
|
|
35
35
|
export {};
|
|
@@ -34,8 +34,8 @@ export default class TableRow extends TableNodeView<HTMLTableRowElement> impleme
|
|
|
34
34
|
update(node: PMNode, ..._args: any[]): boolean;
|
|
35
35
|
destroy(): void;
|
|
36
36
|
ignoreMutation(mutationRecord: MutationRecord | {
|
|
37
|
-
type: 'selection';
|
|
38
37
|
target: Node;
|
|
38
|
+
type: 'selection';
|
|
39
39
|
}): boolean;
|
|
40
40
|
/**
|
|
41
41
|
* Methods
|
|
@@ -8,14 +8,14 @@ import type { PluginInjectionAPI } from '../types';
|
|
|
8
8
|
import TableCell from './TableCell';
|
|
9
9
|
import TableRow from './TableRow';
|
|
10
10
|
type TableViewOptions = {
|
|
11
|
-
|
|
11
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
12
12
|
eventDispatcher: EventDispatcher;
|
|
13
13
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
14
14
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
15
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
16
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
17
|
-
isCommentEditor?: boolean;
|
|
18
15
|
isChromelessEditor?: boolean;
|
|
16
|
+
isCommentEditor?: boolean;
|
|
17
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
18
|
+
portalProviderAPI: PortalProviderAPI;
|
|
19
19
|
};
|
|
20
20
|
export declare const tableView: (options: TableViewOptions) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => import("prosemirror-view").NodeView;
|
|
21
21
|
type TableCellViewOptions = {
|
|
@@ -19,8 +19,8 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
19
19
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
20
20
|
constructor(props: Props);
|
|
21
21
|
getContentDOM(): {
|
|
22
|
-
dom: HTMLElement;
|
|
23
22
|
contentDOM?: HTMLElement;
|
|
23
|
+
dom: HTMLElement;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Handles moving the table from ProseMirror's DOM structure into a React-rendered table node.
|
|
@@ -36,8 +36,8 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
36
36
|
private hasHoveredRows;
|
|
37
37
|
viewShouldUpdate(nextNode: PmNode): boolean;
|
|
38
38
|
ignoreMutation(mutation: MutationRecord | {
|
|
39
|
-
type: 'selection';
|
|
40
39
|
target: Node;
|
|
40
|
+
type: 'selection';
|
|
41
41
|
}): boolean;
|
|
42
42
|
destroy(): void;
|
|
43
43
|
}
|
|
@@ -2,14 +2,14 @@ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
type Config = {
|
|
4
4
|
allowColumnResizing: boolean;
|
|
5
|
-
tableResizingEnabled: boolean;
|
|
6
5
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
6
|
+
isChromelessEditor?: boolean;
|
|
7
|
+
isCommentEditor?: boolean;
|
|
8
|
+
isNested?: boolean;
|
|
7
9
|
isNestingSupported?: boolean;
|
|
8
10
|
isTableScalingEnabled?: boolean;
|
|
9
11
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
10
|
-
|
|
11
|
-
isChromelessEditor?: boolean;
|
|
12
|
-
isNested?: boolean;
|
|
12
|
+
tableResizingEnabled: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const tableNodeSpecWithFixedToDOM: (config: Config) => NodeSpec & {
|
|
15
15
|
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
@@ -6,28 +6,28 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { PluginInjectionAPI } from '../types';
|
|
8
8
|
export type TableOptions = {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
isChromelessEditor?: boolean;
|
|
10
|
+
isCommentEditor?: boolean;
|
|
11
11
|
isDragAndDropEnabled?: boolean;
|
|
12
|
+
isFullWidthModeEnabled?: boolean;
|
|
12
13
|
isTableScalingEnabled?: boolean;
|
|
13
|
-
isCommentEditor?: boolean;
|
|
14
|
-
isChromelessEditor?: boolean;
|
|
15
14
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
15
|
+
wasFullWidthModeEnabled?: boolean;
|
|
16
16
|
};
|
|
17
17
|
export interface Props {
|
|
18
|
-
node: PmNode;
|
|
19
|
-
view: EditorView;
|
|
20
18
|
allowColumnResizing?: boolean;
|
|
21
|
-
allowTableResizing?: boolean;
|
|
22
|
-
allowTableAlignment?: boolean;
|
|
23
19
|
allowControls?: boolean;
|
|
20
|
+
allowTableAlignment?: boolean;
|
|
21
|
+
allowTableResizing?: boolean;
|
|
24
22
|
cellMinWidth?: number;
|
|
25
|
-
|
|
23
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
26
24
|
eventDispatcher: EventDispatcher;
|
|
27
|
-
getPos: () => number | undefined;
|
|
28
|
-
options?: TableOptions;
|
|
29
25
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
30
26
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
31
|
-
|
|
27
|
+
getPos: () => number | undefined;
|
|
28
|
+
node: PmNode;
|
|
29
|
+
options?: TableOptions;
|
|
32
30
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
31
|
+
portalProviderAPI: PortalProviderAPI;
|
|
32
|
+
view: EditorView;
|
|
33
33
|
}
|
|
@@ -7,12 +7,12 @@ export declare enum AnalyticPluginTypes {
|
|
|
7
7
|
UpdateRowOrColumnMovedAndOverflowTrigger = 4
|
|
8
8
|
}
|
|
9
9
|
type UpdateRowOrColumnMovedAction = {
|
|
10
|
-
type: AnalyticPluginTypes.UpdateRowOrColumnMovedAction;
|
|
11
10
|
data: RowOrColumnMovedState;
|
|
11
|
+
type: AnalyticPluginTypes.UpdateRowOrColumnMovedAction;
|
|
12
12
|
};
|
|
13
13
|
type RemoveRowOrColumnMovedAction = {
|
|
14
|
-
type: AnalyticPluginTypes.RemoveRowOrColumnMovedAction;
|
|
15
14
|
data: undefined;
|
|
15
|
+
type: AnalyticPluginTypes.RemoveRowOrColumnMovedAction;
|
|
16
16
|
};
|
|
17
17
|
export type AnalyticPluginAction = UpdateRowOrColumnMovedAction | RemoveRowOrColumnMovedAction;
|
|
18
18
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type ActionType = 'none' | 'addRowOrColumn' | 'copyOrCut' | 'pasted';
|
|
2
2
|
export type RowOrColumnMovedState = {
|
|
3
|
-
|
|
3
|
+
currentActions: Array<ActionType>;
|
|
4
4
|
/** used to confirm if same number of cells was copied and pasted */
|
|
5
5
|
numberOfCells?: number;
|
|
6
|
-
|
|
6
|
+
type?: 'row' | 'column';
|
|
7
7
|
};
|
|
8
8
|
export type AnalyticPluginState = {
|
|
9
9
|
rowOrColumnMoved: RowOrColumnMovedState;
|
|
@@ -11,21 +11,21 @@ export declare const initiateKeyboardColumnResizing: ({ ariaNotify, getIntl, nod
|
|
|
11
11
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
12
12
|
}) => Command;
|
|
13
13
|
export declare const activateNextResizeArea: ({ direction, ariaNotify, getIntl, nodeViewPortalProviderAPI, }: {
|
|
14
|
-
direction: Direction;
|
|
15
14
|
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
15
|
+
direction: Direction;
|
|
16
16
|
getIntl?: () => IntlShape;
|
|
17
17
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
18
18
|
}) => Command;
|
|
19
19
|
export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor, ariaNotify, api, getIntl, }: {
|
|
20
|
-
stepSize: number;
|
|
21
|
-
getEditorContainerWidth: GetEditorContainerWidth;
|
|
22
|
-
isTableScalingEnabled: boolean;
|
|
23
|
-
isTableFixedColumnWidthsOptionEnabled: boolean;
|
|
24
|
-
isCommentEditor: boolean;
|
|
25
20
|
api: PluginInjectionAPI | undefined | null;
|
|
26
21
|
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
22
|
+
getEditorContainerWidth: GetEditorContainerWidth;
|
|
27
23
|
getIntl?: () => IntlShape;
|
|
24
|
+
isCommentEditor: boolean;
|
|
25
|
+
isTableFixedColumnWidthsOptionEnabled: boolean;
|
|
26
|
+
isTableScalingEnabled: boolean;
|
|
28
27
|
originalTr?: Transaction;
|
|
28
|
+
stepSize: number;
|
|
29
29
|
}) => Command;
|
|
30
30
|
export declare const stopKeyboardColumnResizing: ({ ariaNotify, getIntl, originalTr, }: {
|
|
31
31
|
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
@@ -5,16 +5,16 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { PluginInjectionAPI } from '../../types';
|
|
7
7
|
type InsertTableWithNestingSupportCommand = (options: {
|
|
8
|
-
isTableScalingEnabled?: boolean;
|
|
9
|
-
isTableAlignmentEnabled?: boolean;
|
|
10
|
-
isFullWidthModeEnabled?: boolean;
|
|
11
|
-
isCommentEditor?: boolean;
|
|
12
|
-
isChromelessEditor?: boolean;
|
|
13
|
-
isTableResizingEnabled?: boolean;
|
|
14
8
|
createTableProps?: {
|
|
15
|
-
rowsCount?: number;
|
|
16
9
|
colsCount?: number;
|
|
10
|
+
rowsCount?: number;
|
|
17
11
|
};
|
|
12
|
+
isChromelessEditor?: boolean;
|
|
13
|
+
isCommentEditor?: boolean;
|
|
14
|
+
isFullWidthModeEnabled?: boolean;
|
|
15
|
+
isTableAlignmentEnabled?: boolean;
|
|
16
|
+
isTableResizingEnabled?: boolean;
|
|
17
|
+
isTableScalingEnabled?: boolean;
|
|
18
18
|
}, api: PluginInjectionAPI | undefined | null, analyticsPayload?: AnalyticsEventPayload) => EditorCommand;
|
|
19
19
|
export declare function addColumnAt(api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
20
20
|
export declare const addColumnBefore: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => Command;
|
|
@@ -2,8 +2,8 @@ import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
2
2
|
import type { TableDirection } from '../../types';
|
|
3
3
|
import type { DropTargetType } from './consts';
|
|
4
4
|
interface DragAndDropAction<T, D> {
|
|
5
|
-
type: T;
|
|
6
5
|
data: D;
|
|
6
|
+
type: T;
|
|
7
7
|
}
|
|
8
8
|
export declare const DragAndDropActionType: {
|
|
9
9
|
readonly SET_DROP_TARGET: "SET_DROP_TARGET";
|
|
@@ -11,17 +11,17 @@ export declare const DragAndDropActionType: {
|
|
|
11
11
|
readonly TOGGLE_DRAG_MENU: "TOGGLE_DRAG_MENU";
|
|
12
12
|
};
|
|
13
13
|
type DragAndDropSetDropTargetAction = DragAndDropAction<typeof DragAndDropActionType.SET_DROP_TARGET, {
|
|
14
|
-
type: DropTargetType;
|
|
15
|
-
index: number;
|
|
16
14
|
decorationSet: DecorationSet;
|
|
15
|
+
index: number;
|
|
16
|
+
type: DropTargetType;
|
|
17
17
|
}>;
|
|
18
18
|
type DragAndDropClearDropTargetAction = DragAndDropAction<typeof DragAndDropActionType.CLEAR_DROP_TARGET, {
|
|
19
19
|
decorationSet: DecorationSet;
|
|
20
20
|
}>;
|
|
21
21
|
type DragAndDropToggleDragMenuAction = DragAndDropAction<typeof DragAndDropActionType.TOGGLE_DRAG_MENU, {
|
|
22
|
-
isDragMenuOpen: boolean;
|
|
23
22
|
direction: TableDirection;
|
|
24
23
|
index: number;
|
|
24
|
+
isDragMenuOpen: boolean;
|
|
25
25
|
isKeyboardModeActive: boolean;
|
|
26
26
|
}>;
|
|
27
27
|
export type DragAndDropPluginAction = DragAndDropSetDropTargetAction | DragAndDropClearDropTargetAction | DragAndDropToggleDragMenuAction;
|
|
@@ -3,12 +3,12 @@ import type { TableDirection } from '../../types';
|
|
|
3
3
|
import type { DropTargetType } from './consts';
|
|
4
4
|
export interface DragAndDropPluginState {
|
|
5
5
|
decorationSet: DecorationSet;
|
|
6
|
-
dropTargetType: DropTargetType;
|
|
7
|
-
dropTargetIndex: number;
|
|
8
|
-
isDragMenuOpen: boolean;
|
|
9
6
|
dragMenuDirection?: TableDirection;
|
|
10
7
|
dragMenuIndex: number;
|
|
8
|
+
dropTargetIndex: number;
|
|
9
|
+
dropTargetType: DropTargetType;
|
|
11
10
|
isDragging: boolean;
|
|
11
|
+
isDragMenuOpen: boolean;
|
|
12
12
|
isKeyboardModeActive: boolean;
|
|
13
13
|
}
|
|
14
14
|
export type TriggerType = 'mouse' | 'keyboard';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
type AutoScrollerFactory = {
|
|
3
|
-
tableWrapper: HTMLElement;
|
|
4
3
|
getNode: () => PmNode;
|
|
4
|
+
tableWrapper: HTMLElement;
|
|
5
5
|
};
|
|
6
6
|
export declare const autoScrollerFactory: ({ tableWrapper, getNode }: AutoScrollerFactory) => import("@atlaskit/pragmatic-drag-and-drop/types").CleanupFn[];
|
|
7
7
|
export {};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
interface SafariDeleteCompositionTextIssueWorkaroundPluginState {
|
|
9
|
-
renderSpan: boolean;
|
|
10
9
|
decorations: DecorationSet;
|
|
10
|
+
renderSpan: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare const createPlugin: () => SafePlugin<SafariDeleteCompositionTextIssueWorkaroundPluginState>;
|
|
13
13
|
export {};
|
|
@@ -6,15 +6,15 @@ import type { PluginInjectionAPI } from '../../types';
|
|
|
6
6
|
import type { ResizeState } from './utils/types';
|
|
7
7
|
export declare const evenColumns: ({ resizeState, table, start, event, api, }: {
|
|
8
8
|
api: PluginInjectionAPI | undefined | null;
|
|
9
|
+
event: MouseEvent;
|
|
9
10
|
resizeState: ResizeState;
|
|
10
|
-
table: PMNode;
|
|
11
11
|
start: number;
|
|
12
|
-
|
|
12
|
+
table: PMNode;
|
|
13
13
|
}) => Command;
|
|
14
14
|
export declare const distributeColumnsWidths: (newResizeState: ResizeState, table: ContentNodeWithPos, api: PluginInjectionAPI | undefined | null) => Command;
|
|
15
15
|
export declare const setResizeHandlePos: (resizeHandlePos: number | null) => Command;
|
|
16
16
|
export declare const stopResizing: (tr?: Transaction) => Command;
|
|
17
17
|
export declare const setDragging: (dragging: {
|
|
18
|
-
startX: number;
|
|
19
18
|
startWidth: number;
|
|
19
|
+
startX: number;
|
|
20
20
|
} | null, tr?: Transaction) => Command;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export interface ColumnState {
|
|
3
3
|
index: number;
|
|
4
|
-
width: number;
|
|
5
4
|
minWidth: number;
|
|
5
|
+
width: number;
|
|
6
6
|
}
|
|
7
7
|
export declare const getColumnStateFromDOM: (cells: HTMLElement[], index: number, minWidth: number) => ColumnState;
|
|
8
8
|
export declare const getFreeSpace: (state: ColumnState) => number;
|
|
@@ -8,11 +8,11 @@ export declare function getLayoutSize(tableLayout: 'default' | 'wide' | 'full-wi
|
|
|
8
8
|
export declare function pointsAtCell($pos: ResolvedPos): false | PMNode | null;
|
|
9
9
|
export declare function currentColWidth(view: EditorView, cellPos: number, { colspan, colwidth }: CellAttributes): number;
|
|
10
10
|
interface getTableMaxWidthProps {
|
|
11
|
+
getEditorContainerWidth: GetEditorContainerWidth;
|
|
12
|
+
layout: 'default' | 'wide' | 'full-width';
|
|
13
|
+
state: EditorState;
|
|
11
14
|
table: PMNode;
|
|
12
15
|
tableStart: number;
|
|
13
|
-
state: EditorState;
|
|
14
|
-
layout: 'default' | 'wide' | 'full-width';
|
|
15
|
-
getEditorContainerWidth: GetEditorContainerWidth;
|
|
16
16
|
}
|
|
17
17
|
export declare const getTableMaxWidth: ({ table, tableStart, state, layout, getEditorContainerWidth, }: getTableMaxWidthProps) => number;
|
|
18
18
|
/**
|
|
@@ -4,18 +4,18 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
5
5
|
import type { ResizeState, ResizeStateWithAnalytics } from './types';
|
|
6
6
|
export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, isTableScalingEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, }: {
|
|
7
|
-
minWidth: number;
|
|
8
|
-
maxSize: number;
|
|
9
|
-
table: PMNode;
|
|
10
|
-
tableRef: HTMLTableElement | null;
|
|
11
|
-
start: number;
|
|
12
7
|
domAtPos: (pos: number) => {
|
|
13
8
|
node: Node;
|
|
14
9
|
offset: number;
|
|
15
10
|
};
|
|
11
|
+
isCommentEditor: boolean;
|
|
16
12
|
isTableScalingEnabled: boolean;
|
|
13
|
+
maxSize: number;
|
|
14
|
+
minWidth: number;
|
|
17
15
|
shouldUseIncreasedScalingPercent: boolean;
|
|
18
|
-
|
|
16
|
+
start: number;
|
|
17
|
+
table: PMNode;
|
|
18
|
+
tableRef: HTMLTableElement | null;
|
|
19
19
|
}) => ResizeState;
|
|
20
20
|
export declare const updateColgroup: (state: ResizeState, tableRef: HTMLElement | null, tableNode?: PMNode, isTableScalingEnabled?: boolean, scalePercent?: number) => void;
|
|
21
21
|
export declare const getTotalWidth: ({ cols }: ResizeState) => number;
|
|
@@ -4,15 +4,15 @@ import type { DomAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
4
4
|
import type { PluginInjectionAPI } from '../../../types';
|
|
5
5
|
import type { ResizeState } from '../utils/types';
|
|
6
6
|
interface ScaleOptions {
|
|
7
|
-
node: PMNode;
|
|
8
|
-
prevNode: PMNode;
|
|
9
|
-
start: number;
|
|
10
7
|
containerWidth?: number;
|
|
11
|
-
previousContainerWidth?: number;
|
|
12
|
-
parentWidth?: number;
|
|
13
|
-
layoutChanged?: boolean;
|
|
14
8
|
isFullWidthModeEnabled?: boolean;
|
|
15
9
|
isTableResizingEnabled?: boolean;
|
|
10
|
+
layoutChanged?: boolean;
|
|
11
|
+
node: PMNode;
|
|
12
|
+
parentWidth?: number;
|
|
13
|
+
previousContainerWidth?: number;
|
|
14
|
+
prevNode: PMNode;
|
|
15
|
+
start: number;
|
|
16
16
|
}
|
|
17
17
|
export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
|
|
18
18
|
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean, isTableWithFixedColumnWidthsOptionEnabled?: boolean, isCommentEditor?: boolean) => void;
|