@atlaskit/editor-plugin-table 4.1.1 → 4.2.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 +12 -0
- package/dist/cjs/plugins/table/commands/delete.js +18 -0
- package/dist/cjs/plugins/table/commands-with-analytics.js +2 -7
- package/dist/cjs/plugins/table/event-handlers.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/table/transforms/column-width.js +112 -7
- package/dist/cjs/plugins/table/transforms/delete-columns.js +16 -6
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +1 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/es2019/plugins/table/commands/delete.js +10 -0
- package/dist/es2019/plugins/table/commands-with-analytics.js +3 -8
- package/dist/es2019/plugins/table/event-handlers.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/table/transforms/column-width.js +107 -7
- package/dist/es2019/plugins/table/transforms/delete-columns.js +16 -5
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +1 -1
- package/dist/es2019/plugins/table/ui/common-styles.js +0 -1
- package/dist/esm/plugins/table/commands/delete.js +12 -0
- package/dist/esm/plugins/table/commands-with-analytics.js +3 -8
- package/dist/esm/plugins/table/event-handlers.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/table/transforms/column-width.js +113 -7
- package/dist/esm/plugins/table/transforms/delete-columns.js +16 -6
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +1 -1
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/types/plugins/table/commands/delete.d.ts +3 -0
- package/dist/types/plugins/table/event-handlers.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -1
- package/dist/types/plugins/table/transforms/column-width.d.ts +25 -6
- package/dist/types/plugins/table/transforms/delete-columns.d.ts +2 -1
- package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +4 -4
- package/package.json +5 -2
- package/src/__tests__/unit/commands.ts +1 -0
- package/src/__tests__/unit/transforms/delete-columns.ts +406 -105
- package/src/__tests__/unit/undo-redo.ts +1 -1
- package/src/plugins/table/commands/delete.ts +20 -0
- package/src/plugins/table/commands-with-analytics.ts +3 -10
- package/src/plugins/table/event-handlers.ts +6 -1
- package/src/plugins/table/pm-plugins/main.ts +7 -1
- package/src/plugins/table/pm-plugins/table-resizing/utils/misc.ts +1 -1
- package/src/plugins/table/transforms/column-width.ts +163 -17
- package/src/plugins/table/transforms/delete-columns.ts +23 -6
- package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +1 -1
- package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +7 -6
- package/src/plugins/table/ui/common-styles.ts +0 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -37
- package/dist/types-ts4.5/i18n/da.d.ts +0 -35
- package/dist/types-ts4.5/i18n/de.d.ts +0 -35
- package/dist/types-ts4.5/i18n/en.d.ts +0 -37
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -37
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -37
- package/dist/types-ts4.5/i18n/es.d.ts +0 -35
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -35
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -37
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -37
- package/dist/types-ts4.5/i18n/it.d.ts +0 -37
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -37
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -35
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -35
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -37
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -37
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -37
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -37
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -35
- package/dist/types-ts4.5/i18n/th.d.ts +0 -35
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -37
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -37
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -35
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -37
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -37
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/commands/clear.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/commands/collapse.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/commands/go-to-next-cell.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/commands/hover.d.ts +0 -8
- package/dist/types-ts4.5/plugins/table/commands/index.d.ts +0 -8
- package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +0 -9
- package/dist/types-ts4.5/plugins/table/commands/misc.d.ts +0 -29
- package/dist/types-ts4.5/plugins/table/commands/referentiality.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/commands/selection.d.ts +0 -8
- package/dist/types-ts4.5/plugins/table/commands/sort.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/commands/split-cell.d.ts +0 -6
- package/dist/types-ts4.5/plugins/table/commands/toggle.d.ts +0 -12
- package/dist/types-ts4.5/plugins/table/commands-with-analytics.d.ts +0 -25
- package/dist/types-ts4.5/plugins/table/create-plugin-config.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +0 -15
- package/dist/types-ts4.5/plugins/table/handlers.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/index.d.ts +0 -45
- package/dist/types-ts4.5/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +0 -24
- package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +0 -73
- package/dist/types-ts4.5/plugins/table/nodeviews/TableContainer.d.ts +0 -44
- package/dist/types-ts4.5/plugins/table/nodeviews/TableResizer.d.ts +0 -25
- package/dist/types-ts4.5/plugins/table/nodeviews/TableStickyScrollbar.d.ts +0 -24
- package/dist/types-ts4.5/plugins/table/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +0 -9
- package/dist/types-ts4.5/plugins/table/nodeviews/__mocks__/OverridableMock.d.ts +0 -9
- package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +0 -33
- package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +0 -17
- package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +0 -26
- package/dist/types-ts4.5/plugins/table/nodeviews/update-overflow-shadows.d.ts +0 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +0 -7
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/compose-decorations.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/types.d.ts +0 -6
- package/dist/types-ts4.5/plugins/table/pm-plugins/default-table-selection.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +0 -8
- package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-factory.d.ts +0 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +0 -15
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/commands.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/index.d.ts +0 -6
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +0 -6
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +0 -73
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/types.d.ts +0 -16
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/util.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-analytics.d.ts +0 -23
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +0 -10
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/commands.d.ts +0 -23
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +0 -6
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/reducer.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +0 -23
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +0 -14
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/consts.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/content-width.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +0 -12
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +0 -13
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +0 -20
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +0 -29
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -21
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +0 -22
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.d.ts +0 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-selection-keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +0 -17
- package/dist/types-ts4.5/plugins/table/reducer.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/toolbar.d.ts +0 -36
- package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +0 -18
- package/dist/types-ts4.5/plugins/table/transforms/delete-columns.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/transforms/delete-rows.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/transforms/fix-tables.d.ts +0 -9
- package/dist/types-ts4.5/plugins/table/transforms/index.d.ts +0 -6
- package/dist/types-ts4.5/plugins/table/transforms/merge.d.ts +0 -5
- package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +0 -5
- package/dist/types-ts4.5/plugins/table/transforms/split.d.ts +0 -9
- package/dist/types-ts4.5/plugins/table/types.d.ts +0 -342
- package/dist/types-ts4.5/plugins/table/ui/ColumnResizeWidget/index.d.ts +0 -9
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/FixedButton.d.ts +0 -23
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +0 -21
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/styles.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +0 -87
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +0 -23
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/styles.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +0 -13
- package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.d.ts +0 -10
- package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +0 -54
- package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/types.d.ts +0 -1
- package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +0 -13
- package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +0 -3
- package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +0 -35
- package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +0 -21
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +0 -16
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +0 -21
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +0 -17
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +0 -39
- package/dist/types-ts4.5/plugins/table/ui/common-styles.d.ts +0 -9
- package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +0 -50
- package/dist/types-ts4.5/plugins/table/ui/messages.d.ts +0 -63
- package/dist/types-ts4.5/plugins/table/ui/ui-styles.d.ts +0 -15
- package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +0 -45
- package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +0 -29
- package/dist/types-ts4.5/plugins/table/utils/column-controls.d.ts +0 -10
- package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +0 -19
- package/dist/types-ts4.5/plugins/table/utils/dom.d.ts +0 -20
- package/dist/types-ts4.5/plugins/table/utils/get-allow-add-column-custom-step.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/utils/guidelines.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/utils/index.d.ts +0 -11
- package/dist/types-ts4.5/plugins/table/utils/nodes.d.ts +0 -13
- package/dist/types-ts4.5/plugins/table/utils/paste.d.ts +0 -14
- package/dist/types-ts4.5/plugins/table/utils/row-controls.d.ts +0 -16
- package/dist/types-ts4.5/plugins/table/utils/selection.d.ts +0 -6
- package/dist/types-ts4.5/plugins/table/utils/snapping.d.ts +0 -10
- package/dist/types-ts4.5/plugins/table/utils/table.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table/utils/update-plugin-state-decorations.d.ts +0 -4
- package/dist/types-ts4.5/plugins/table-plugin.d.ts +0 -2
- package/dist/types-ts4.5/types/i18n.d.ts +0 -5
- package/tmp/api-report-tmp.d.ts +0 -112
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
export interface Props {
|
|
5
|
-
editorView: EditorView;
|
|
6
|
-
tableRef?: HTMLTableElement;
|
|
7
|
-
isInDanger?: boolean;
|
|
8
|
-
isResizing?: boolean;
|
|
9
|
-
hoveredRows?: number[];
|
|
10
|
-
isHeaderColumnEnabled?: boolean;
|
|
11
|
-
isHeaderRowEnabled?: boolean;
|
|
12
|
-
stickyTop?: number;
|
|
13
|
-
}
|
|
14
|
-
export declare const CornerControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
15
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
16
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export interface Props {
|
|
4
|
-
editorView: EditorView;
|
|
5
|
-
tableRef: HTMLTableElement;
|
|
6
|
-
tableActive?: boolean;
|
|
7
|
-
hoverRows: (rows: number[], danger?: boolean) => void;
|
|
8
|
-
hoveredRows?: number[];
|
|
9
|
-
selectRow: (row: number, expand: boolean) => void;
|
|
10
|
-
hasHeaderRow?: boolean;
|
|
11
|
-
isInDanger?: boolean;
|
|
12
|
-
isResizing?: boolean;
|
|
13
|
-
stickyTop?: number;
|
|
14
|
-
}
|
|
15
|
-
export default class NumberColumn extends Component<Props, any> {
|
|
16
|
-
render(): JSX.Element;
|
|
17
|
-
private hoverRows;
|
|
18
|
-
private selectRow;
|
|
19
|
-
private clearHoverSelection;
|
|
20
|
-
private getClassNames;
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
export interface Props {
|
|
5
|
-
editorView: EditorView;
|
|
6
|
-
tableRef: HTMLTableElement;
|
|
7
|
-
selectRow: (row: number, expand: boolean) => void;
|
|
8
|
-
hoverRows: (rows: number[], danger?: boolean) => void;
|
|
9
|
-
hoveredRows?: number[];
|
|
10
|
-
isInDanger?: boolean;
|
|
11
|
-
isResizing?: boolean;
|
|
12
|
-
insertRowButtonIndex?: number;
|
|
13
|
-
stickyTop?: number;
|
|
14
|
-
}
|
|
15
|
-
export declare const RowControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
16
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
17
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import type { TableColumnOrdering } from '@atlaskit/custom-steps';
|
|
3
|
-
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
-
export interface Props {
|
|
8
|
-
editorView: EditorView;
|
|
9
|
-
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
10
|
-
selection?: Selection;
|
|
11
|
-
tableRef?: HTMLTableElement;
|
|
12
|
-
tableActive?: boolean;
|
|
13
|
-
isInDanger?: boolean;
|
|
14
|
-
isResizing?: boolean;
|
|
15
|
-
isHeaderRowEnabled?: boolean;
|
|
16
|
-
isHeaderColumnEnabled?: boolean;
|
|
17
|
-
isNumberColumnEnabled?: boolean;
|
|
18
|
-
hasHeaderRow?: boolean;
|
|
19
|
-
headerRowHeight?: number;
|
|
20
|
-
hoveredRows?: number[];
|
|
21
|
-
ordering?: TableColumnOrdering;
|
|
22
|
-
stickyHeader?: RowStickyState;
|
|
23
|
-
}
|
|
24
|
-
interface State {
|
|
25
|
-
tableHeight: number;
|
|
26
|
-
}
|
|
27
|
-
export default class TableFloatingControls extends Component<Props, State> {
|
|
28
|
-
static displayName: string;
|
|
29
|
-
private resizeObserver?;
|
|
30
|
-
componentDidMount(): void;
|
|
31
|
-
componentDidUpdate(): void;
|
|
32
|
-
private tryInitResizeObserver;
|
|
33
|
-
shouldComponentUpdate(nextProps: Props, nextState: State): boolean;
|
|
34
|
-
componentWillUnmount(): void;
|
|
35
|
-
render(): JSX.Element | null;
|
|
36
|
-
private selectRow;
|
|
37
|
-
private hoverRows;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
3
|
-
export declare const insertColumnButtonOffset: number;
|
|
4
|
-
export declare const tableRowHeight = 44;
|
|
5
|
-
export declare const tableStyles: (props: ThemeProps & {
|
|
6
|
-
featureFlags?: FeatureFlags;
|
|
7
|
-
}) => import("@emotion/react").SerializedStyles;
|
|
8
|
-
export declare const tableFullPageEditorStyles: import("@emotion/react").SerializedStyles;
|
|
9
|
-
export declare const tableCommentEditorStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Basic colors added to prevent content overflow in table cells.
|
|
3
|
-
*/
|
|
4
|
-
export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-surface)">;
|
|
5
|
-
export declare const tableHeaderCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtlest)">;
|
|
6
|
-
export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-subtle)">;
|
|
7
|
-
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
8
|
-
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtler)">;
|
|
9
|
-
export declare const tableFloatingControlsColor: "var(--ds-background-neutral)";
|
|
10
|
-
export declare const tableCellSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-blanket-selected)">;
|
|
11
|
-
export declare const tableToolbarSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-selected-pressed)">;
|
|
12
|
-
export declare const tableBorderSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border-focused)">;
|
|
13
|
-
export declare const tableCellSelectedDeleteIconColor: import("@atlaskit/theme").ThemedValue<"var(--ds-icon-subtle)">;
|
|
14
|
-
export declare const tableCellSelectedDeleteIconBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtlest)">;
|
|
15
|
-
export declare const tableCellDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-blanket-danger)">;
|
|
16
|
-
export declare const tableBorderDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border-danger)">;
|
|
17
|
-
export declare const tableToolbarDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-danger-pressed)">;
|
|
18
|
-
export declare const tableCellHoverDeleteIconColor: import("@atlaskit/theme").ThemedValue<"var(--ds-icon-inverse)">;
|
|
19
|
-
export declare const tableCellHoverDeleteIconBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-danger-bold)">;
|
|
20
|
-
export declare const tableBorderRadiusSize = 3;
|
|
21
|
-
export declare const tablePadding = 8;
|
|
22
|
-
export declare const tableScrollbarOffset = 15;
|
|
23
|
-
export declare const tableMarginFullWidthMode = 2;
|
|
24
|
-
export declare const tableInsertColumnButtonSize = 20;
|
|
25
|
-
export declare const tableDeleteButtonSize = 16;
|
|
26
|
-
export declare const tableDeleteButtonOffset = 6;
|
|
27
|
-
export declare const tableToolbarSize = 11;
|
|
28
|
-
export declare const tableControlsSpacing: number;
|
|
29
|
-
export declare const tableInsertColumnButtonOffset = 3;
|
|
30
|
-
export declare const layoutButtonSize = 32;
|
|
31
|
-
export declare const lineMarkerOffsetFromColumnControls = 13;
|
|
32
|
-
export declare const lineMarkerSize = 4;
|
|
33
|
-
export declare const columnControlsDecorationHeight = 25;
|
|
34
|
-
export declare const columnControlsZIndex: number;
|
|
35
|
-
export declare const columnControlsSelectedZIndex: number;
|
|
36
|
-
export declare const columnResizeHandleZIndex: number;
|
|
37
|
-
export declare const resizeHandlerAreaWidth: number;
|
|
38
|
-
export declare const resizeLineWidth = 2;
|
|
39
|
-
export declare const resizeHandlerZIndex: number;
|
|
40
|
-
export declare const contextualMenuTriggerSize = 16;
|
|
41
|
-
export declare const contextualMenuDropdownWidth = 180;
|
|
42
|
-
export declare const stickyRowZIndex: number;
|
|
43
|
-
export declare const stickyRowOffsetTop = 8;
|
|
44
|
-
export declare const stickyHeaderBorderBottomWidth = 1;
|
|
45
|
-
export declare const tableOverflowShadowWidth = 8;
|
|
46
|
-
export declare const tableOverflowShadowWidthWide = 32;
|
|
47
|
-
export declare const TABLE_SNAP_GAP = 9;
|
|
48
|
-
export declare const TABLE_HIGHLIGHT_GAP = 10;
|
|
49
|
-
export declare const TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
50
|
-
export declare const STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
insertColumn: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
removeColumns: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
insertRow: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
removeRows: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
cellOptions: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
confirmDeleteLinkedModalOKButton: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
confirmDeleteLinkedModalMessage: {
|
|
33
|
-
id: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
confirmDeleteLinkedModalMessagePrefix: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
confirmModalCheckboxLabel: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
deleteElementTitle: {
|
|
48
|
-
id: string;
|
|
49
|
-
defaultMessage: string;
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
unnamedSource: {
|
|
53
|
-
id: string;
|
|
54
|
-
defaultMessage: string;
|
|
55
|
-
description: string;
|
|
56
|
-
};
|
|
57
|
-
adjustColumns: {
|
|
58
|
-
id: string;
|
|
59
|
-
defaultMessage: string;
|
|
60
|
-
description: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
|
-
export declare const InsertMarker: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
|
|
3
|
-
export declare const HeaderButton: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
|
|
4
|
-
export declare const HeaderButtonHover: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const HeaderButtonDanger: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
6
|
-
export declare const insertColumnButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
7
|
-
export declare const insertRowButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
8
|
-
export declare const columnControlsLineMarker: () => import("@emotion/react").SerializedStyles;
|
|
9
|
-
export declare const DeleteButton: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
10
|
-
export declare const OverflowShadow: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
11
|
-
export declare const columnControlsDecoration: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
12
|
-
export declare const hoveredDeleteButton: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
13
|
-
export declare const hoveredCell: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
14
|
-
export declare const hoveredWarningCell: import("@emotion/react").SerializedStyles;
|
|
15
|
-
export declare const resizeHandle: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { AnalyticsEventPayload, AnalyticsEventPayloadCallback, EditorAnalyticsAPI, TableEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { HigherOrderCommand } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
6
|
-
export declare function getSelectedTableInfo(selection: Selection): {
|
|
7
|
-
table: import("prosemirror-utils").ContentNodeWithPos | undefined;
|
|
8
|
-
map: TableMap | undefined;
|
|
9
|
-
totalRowCount: number;
|
|
10
|
-
totalColumnCount: number;
|
|
11
|
-
};
|
|
12
|
-
export declare function getSelectedCellInfo(selection: Selection): {
|
|
13
|
-
totalRowCount: number;
|
|
14
|
-
totalColumnCount: number;
|
|
15
|
-
horizontalCells: number;
|
|
16
|
-
verticalCells: number;
|
|
17
|
-
totalCells: number;
|
|
18
|
-
};
|
|
19
|
-
export declare const withEditorAnalyticsAPI: (payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback) => (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => HigherOrderCommand;
|
|
20
|
-
interface UseMeasureFramerateConfig {
|
|
21
|
-
maxSamples?: number;
|
|
22
|
-
minFrames?: number;
|
|
23
|
-
minTimeMs?: number;
|
|
24
|
-
sampleRateMs?: number;
|
|
25
|
-
timeoutMs?: number;
|
|
26
|
-
}
|
|
27
|
-
export declare const generateResizedPayload: (props: {
|
|
28
|
-
originalNode: PMNode;
|
|
29
|
-
resizedNode: PMNode;
|
|
30
|
-
}) => TableEventPayload;
|
|
31
|
-
export declare const reduceResizeFrameRateSamples: (frameRateSamples: number[]) => number[];
|
|
32
|
-
export declare const generateResizeFrameRatePayloads: (props: {
|
|
33
|
-
docSize: number;
|
|
34
|
-
frameRateSamples: number[];
|
|
35
|
-
originalNode: PMNode;
|
|
36
|
-
}) => TableEventPayload[];
|
|
37
|
-
/**
|
|
38
|
-
* Measures the framerate of a component over a given time period.
|
|
39
|
-
*/
|
|
40
|
-
export declare const useMeasureFramerate: (config?: UseMeasureFramerateConfig) => {
|
|
41
|
-
startMeasure: () => void;
|
|
42
|
-
endMeasure: () => number[];
|
|
43
|
-
countFrames: () => void;
|
|
44
|
-
};
|
|
45
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { NodeRange, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
interface IsTableCollapsibleResult {
|
|
4
|
-
tableIsCollapsible: boolean;
|
|
5
|
-
range?: NodeRange;
|
|
6
|
-
findWrappingRes?: Array<{
|
|
7
|
-
type: NodeType;
|
|
8
|
-
attrs?: {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
} | null;
|
|
11
|
-
}> | null | undefined;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Checks whether we can wrap the selected table into an expand via
|
|
15
|
-
* prosemirror-transform's `findWrapping` helper
|
|
16
|
-
*/
|
|
17
|
-
export declare const isTableCollapsible: (tr: Transaction | ReadonlyTransaction) => IsTableCollapsibleResult;
|
|
18
|
-
/**
|
|
19
|
-
* Collapses the selected table into an expand given a transaction via
|
|
20
|
-
* `Transform.wrap`.
|
|
21
|
-
*
|
|
22
|
-
* Will return undefined if it cannot determine the relevant table from a
|
|
23
|
-
* selection, or if the table itself isn't collapsible.
|
|
24
|
-
*
|
|
25
|
-
* @param tr
|
|
26
|
-
* @returns Transaction | undefined
|
|
27
|
-
*/
|
|
28
|
-
export declare const collapseSelectedTable: (tr: Transaction) => Transaction | undefined;
|
|
29
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const getColumnsWidths: (view: EditorView) => Array<number | undefined>;
|
|
4
|
-
export declare const isColumnDeleteButtonVisible: (selection: Selection) => boolean;
|
|
5
|
-
export declare const getColumnDeleteButtonParams: (columnsWidths: Array<number | undefined>, selection: Selection) => {
|
|
6
|
-
left: number;
|
|
7
|
-
indexes: number[];
|
|
8
|
-
} | null;
|
|
9
|
-
export declare const getColumnClassNames: (index: number, selection: Selection, hoveredColumns?: number[], isInDanger?: boolean, isResizing?: boolean) => string;
|
|
10
|
-
export declare const colWidthsForRow: (tr: HTMLTableRowElement) => string;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { ReadonlyTransaction, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { Cell, CellColumnPositioning } from '../types';
|
|
7
|
-
import { TableDecorations } from '../types';
|
|
8
|
-
export declare const findColumnControlSelectedDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
9
|
-
export declare const findControlsHoverDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
10
|
-
export declare const createCellHoverDecoration: (cells: Cell[]) => Decoration[];
|
|
11
|
-
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', tr: Transaction | ReadonlyTransaction, danger?: boolean, selected?: boolean) => Decoration[];
|
|
12
|
-
export declare const createColumnSelectedDecoration: (tr: Transaction | ReadonlyTransaction) => Decoration[];
|
|
13
|
-
export declare const createColumnControlsDecoration: (selection: Selection) => Decoration[];
|
|
14
|
-
export declare const updateDecorations: (node: PmNode, decorationSet: DecorationSet, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
|
15
|
-
export declare const createResizeHandleDecoration: (tr: Transaction | ReadonlyTransaction, rowIndexTarget: number, columnEndIndexTarget: Omit<CellColumnPositioning, 'left'>, includeTooltip: boolean | undefined, getIntl: () => IntlShape) => [
|
|
16
|
-
Decoration[],
|
|
17
|
-
Decoration[]
|
|
18
|
-
];
|
|
19
|
-
export declare const createColumnLineResize: (selection: Selection, cellColumnPositioning: Omit<CellColumnPositioning, 'left'>) => Decoration[];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ElementContentRects } from '../types';
|
|
2
|
-
export declare const isCell: (node: HTMLElement | null) => boolean;
|
|
3
|
-
export declare const isCornerButton: (node: HTMLElement | null) => boolean;
|
|
4
|
-
export declare const isInsertRowButton: (node: HTMLElement | null) => boolean | HTMLElement | null;
|
|
5
|
-
export declare const getColumnOrRowIndex: (target: HTMLElement) => [
|
|
6
|
-
number,
|
|
7
|
-
number
|
|
8
|
-
];
|
|
9
|
-
export declare const isColumnControlsDecorations: (node: HTMLElement | null) => boolean;
|
|
10
|
-
export declare const isRowControlsButton: (node: HTMLElement | null) => boolean;
|
|
11
|
-
export declare const isResizeHandleDecoration: (node: HTMLElement | null) => boolean;
|
|
12
|
-
export declare const isTableControlsButton: (node: HTMLElement | null) => boolean;
|
|
13
|
-
export declare const isTableContainerOrWrapper: (node: HTMLElement | null) => boolean;
|
|
14
|
-
export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, elementContentRects?: ElementContentRects, gapInPixels?: number) => 'left' | 'right' | null;
|
|
15
|
-
export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => 'top' | 'bottom' | null;
|
|
16
|
-
export declare const updateResizeHandles: (tableRef?: HTMLElement) => void;
|
|
17
|
-
export declare const hasResizeHandler: ({ columnEndIndexTarget, target, }: {
|
|
18
|
-
columnEndIndexTarget: number;
|
|
19
|
-
target: HTMLElement;
|
|
20
|
-
}) => boolean;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { getSelectedColumnIndexes, getSelectedRowIndexes, normalizeSelection, isSelectionUpdated, } from './selection';
|
|
2
|
-
export { findControlsHoverDecoration, createControlsHoverDecoration, createColumnControlsDecoration, createColumnSelectedDecoration, createCellHoverDecoration, updateDecorations, createResizeHandleDecoration, createColumnLineResize, } from './decoration';
|
|
3
|
-
export { isIsolating, containsHeaderColumn, containsHeaderRow, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled, isLayoutSupported, getTableWidth, tablesHaveDifferentColumnWidths, tablesHaveDifferentNoOfColumns, isTableNested, } from './nodes';
|
|
4
|
-
export { unwrapContentFromTable, removeTableFromFirstChild, removeTableFromLastChild, transformSliceToRemoveOpenTable, transformSliceToCorrectEmptyTableCells, transformSliceToFixHardBreakProblemOnCopyFromCell, } from './paste';
|
|
5
|
-
export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowControlsButton, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler, } from './dom';
|
|
6
|
-
export { getColumnsWidths, isColumnDeleteButtonVisible, getColumnDeleteButtonParams, getColumnClassNames, } from './column-controls';
|
|
7
|
-
export { getRowHeights, isRowDeleteButtonVisible, getRowDeleteButtonParams, getRowsParams, getRowClassNames, copyPreviousRow, } from './row-controls';
|
|
8
|
-
export type { RowParams } from './row-controls';
|
|
9
|
-
export { getSelectedTableInfo, getSelectedCellInfo } from './analytics';
|
|
10
|
-
export { getMergedCellsPositions } from './table';
|
|
11
|
-
export { updatePluginStateDecorations } from './update-plugin-state-decorations';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const isIsolating: (node: PmNode) => boolean;
|
|
4
|
-
export declare const containsHeaderColumn: (table: PmNode) => boolean;
|
|
5
|
-
export declare const containsHeaderRow: (table: PmNode) => boolean;
|
|
6
|
-
export declare const checkIfHeaderColumnEnabled: (selection: Selection) => boolean;
|
|
7
|
-
export declare const checkIfHeaderRowEnabled: (selection: Selection) => boolean;
|
|
8
|
-
export declare const checkIfNumberColumnEnabled: (selection: Selection) => boolean;
|
|
9
|
-
export declare const isLayoutSupported: (state: EditorState) => boolean;
|
|
10
|
-
export declare const getTableWidth: (node: PmNode) => number;
|
|
11
|
-
export declare const tablesHaveDifferentColumnWidths: (currentTable: PmNode, previousTable: PmNode) => boolean;
|
|
12
|
-
export declare const tablesHaveDifferentNoOfColumns: (currentTable: PmNode, previousTable: PmNode) => boolean;
|
|
13
|
-
export declare const isTableNested: (state: EditorState, tablePos?: number) => boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Fragment, Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const unwrapContentFromTable: (maybeTable: PMNode) => PMNode | PMNode[];
|
|
4
|
-
export declare const removeTableFromFirstChild: (node: PMNode, i: number) => PMNode | PMNode[];
|
|
5
|
-
export declare const removeTableFromLastChild: (node: PMNode, i: number, fragment: Fragment) => PMNode | PMNode[];
|
|
6
|
-
/**
|
|
7
|
-
* When we copy from a table cell with a hardBreak at the end,
|
|
8
|
-
* the slice generated will come with a hardBreak outside of the table.
|
|
9
|
-
* This code will look for that pattern and fix it.
|
|
10
|
-
*/
|
|
11
|
-
export declare const transformSliceToFixHardBreakProblemOnCopyFromCell: (slice: Slice, schema: Schema) => Slice;
|
|
12
|
-
export declare const transformSliceToRemoveOpenTable: (slice: Slice, schema: Schema) => Slice;
|
|
13
|
-
export declare const transformSliceToCorrectEmptyTableCells: (slice: Slice, schema: Schema) => Slice;
|
|
14
|
-
export declare function isHeaderRowRequired(state: EditorState): boolean | undefined;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export interface RowParams {
|
|
4
|
-
startIndex: number;
|
|
5
|
-
endIndex: number;
|
|
6
|
-
height: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const getRowHeights: (tableRef: HTMLTableElement) => number[];
|
|
9
|
-
export declare const isRowDeleteButtonVisible: (selection: Selection) => boolean;
|
|
10
|
-
export declare const getRowDeleteButtonParams: (rowsHeights: Array<number | undefined>, selection: Selection, offsetTop?: number) => {
|
|
11
|
-
top: number;
|
|
12
|
-
indexes: number[];
|
|
13
|
-
} | null;
|
|
14
|
-
export declare const getRowsParams: (rowsHeights: Array<number | undefined>) => RowParams[];
|
|
15
|
-
export declare const getRowClassNames: (index: number, selection: Selection, hoveredRows?: number[], isInDanger?: boolean, isResizing?: boolean) => string;
|
|
16
|
-
export declare const copyPreviousRow: (schema: Schema) => (insertNewRowIndex: number) => (tr: Transaction) => Transaction;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
3
|
-
export declare const isSelectionUpdated: (oldSelection: Selection, newSelection?: Selection) => boolean;
|
|
4
|
-
export declare const normalizeSelection: (tr: Transaction) => Transaction;
|
|
5
|
-
export declare const getSelectedColumnIndexes: (selectionRect: Rect) => number[];
|
|
6
|
-
export declare const getSelectedRowIndexes: (selectionRect: Rect) => number[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
|
-
export declare const calculateDefaultSnappings: (lengthOffset?: number) => number[];
|
|
3
|
-
export declare const defaultSnappingWidths: number[];
|
|
4
|
-
/**
|
|
5
|
-
* Returns keys of guidelines that are closest to the table and withthin the snapGap
|
|
6
|
-
*/
|
|
7
|
-
export declare const findClosestSnap: (currentWidth: number, snapWidths: number[], guidelines: GuidelineConfig[], snapGap?: number, tolerance?: number) => {
|
|
8
|
-
gap: number;
|
|
9
|
-
keys: string[];
|
|
10
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
3
|
-
export declare const getMergedCellsPositions: (tr: Transaction) => number[];
|
|
4
|
-
export declare const colsToRect: (cols: Array<number>, noOfRows: number) => Rect;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { TableDecorations } from '../types';
|
|
4
|
-
export declare const updatePluginStateDecorations: (state: EditorState, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-plugin-table"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
11
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
12
|
-
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
13
|
-
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
14
|
-
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
15
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
16
|
-
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
17
|
-
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
18
|
-
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
19
|
-
|
|
20
|
-
// @public (undocumented)
|
|
21
|
-
type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
|
|
22
|
-
|
|
23
|
-
// @public (undocumented)
|
|
24
|
-
type PermittedLayoutsDescriptor = 'all' | TableLayout[];
|
|
25
|
-
|
|
26
|
-
// @public (undocumented)
|
|
27
|
-
interface PluginConfig {
|
|
28
|
-
// (undocumented)
|
|
29
|
-
advanced?: boolean;
|
|
30
|
-
// (undocumented)
|
|
31
|
-
allowAddColumnWithCustomStep?: boolean;
|
|
32
|
-
// (undocumented)
|
|
33
|
-
allowBackgroundColor?: boolean;
|
|
34
|
-
// (undocumented)
|
|
35
|
-
allowCellOptionsInFloatingToolbar?: boolean;
|
|
36
|
-
// (undocumented)
|
|
37
|
-
allowCollapse?: boolean;
|
|
38
|
-
// (undocumented)
|
|
39
|
-
allowColumnResizing?: boolean;
|
|
40
|
-
// (undocumented)
|
|
41
|
-
allowColumnSorting?: boolean;
|
|
42
|
-
// (undocumented)
|
|
43
|
-
allowControls?: boolean;
|
|
44
|
-
// (undocumented)
|
|
45
|
-
allowDistributeColumns?: boolean;
|
|
46
|
-
// (undocumented)
|
|
47
|
-
allowHeaderColumn?: boolean;
|
|
48
|
-
// (undocumented)
|
|
49
|
-
allowHeaderRow?: boolean;
|
|
50
|
-
// (undocumented)
|
|
51
|
-
allowMergeCells?: boolean;
|
|
52
|
-
// (undocumented)
|
|
53
|
-
allowNumberColumn?: boolean;
|
|
54
|
-
// (undocumented)
|
|
55
|
-
isHeaderRowRequired?: boolean;
|
|
56
|
-
// (undocumented)
|
|
57
|
-
permittedLayouts?: PermittedLayoutsDescriptor;
|
|
58
|
-
// (undocumented)
|
|
59
|
-
stickyHeaders?: boolean;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// @public (undocumented)
|
|
63
|
-
type SelectionPlugin = NextEditorPlugin<'selection', {
|
|
64
|
-
pluginConfiguration: unknown;
|
|
65
|
-
commands: {
|
|
66
|
-
displayGapCursor: (toggle: boolean) => EditorCommand;
|
|
67
|
-
};
|
|
68
|
-
}>;
|
|
69
|
-
|
|
70
|
-
// @public (undocumented)
|
|
71
|
-
export type TablePlugin = NextEditorPlugin<'table', {
|
|
72
|
-
pluginConfiguration: TablePluginOptions | undefined;
|
|
73
|
-
actions: {
|
|
74
|
-
insertTable: InsertTableAction;
|
|
75
|
-
};
|
|
76
|
-
dependencies: [
|
|
77
|
-
AnalyticsPlugin,
|
|
78
|
-
ContentInsertionPlugin,
|
|
79
|
-
WidthPlugin,
|
|
80
|
-
GuidelinePlugin,
|
|
81
|
-
OptionalPlugin<SelectionPlugin>
|
|
82
|
-
];
|
|
83
|
-
}>;
|
|
84
|
-
|
|
85
|
-
// @public (undocumented)
|
|
86
|
-
interface TablePluginOptions {
|
|
87
|
-
// (undocumented)
|
|
88
|
-
allowContextualMenu?: boolean;
|
|
89
|
-
// (undocumented)
|
|
90
|
-
breakoutEnabled?: boolean;
|
|
91
|
-
// (undocumented)
|
|
92
|
-
dragAndDropEnabled?: boolean;
|
|
93
|
-
// (undocumented)
|
|
94
|
-
editorSelectionAPI?: EditorSelectionAPI;
|
|
95
|
-
// (undocumented)
|
|
96
|
-
fullWidthEnabled?: boolean;
|
|
97
|
-
// (undocumented)
|
|
98
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
99
|
-
// (undocumented)
|
|
100
|
-
tableOptions: PluginConfig;
|
|
101
|
-
// (undocumented)
|
|
102
|
-
tableResizingEnabled?: boolean;
|
|
103
|
-
// (undocumented)
|
|
104
|
-
wasFullWidthEnabled?: boolean;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// @public
|
|
108
|
-
export const tablesPlugin: TablePlugin;
|
|
109
|
-
|
|
110
|
-
// (No @packageDocumentation comment for this package)
|
|
111
|
-
|
|
112
|
-
```
|