@atlaskit/editor-plugin-table 1.7.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/plugins/table/index.js +11 -16
- package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +2 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +12 -12
- package/dist/cjs/plugins/table/utils/nodes.js +4 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/index.js +11 -16
- package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +4 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +1 -1
- package/dist/es2019/plugins/table/utils/nodes.js +3 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/index.js +11 -16
- package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +2 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +12 -12
- package/dist/esm/plugins/table/utils/nodes.js +4 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/table/commands/insert.d.ts +1 -1
- package/dist/types/plugins/table/index.d.ts +0 -2
- package/dist/types/plugins/table/nodeviews/table.d.ts +3 -3
- package/dist/types/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
- package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +2 -2
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-add-width.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-local-id.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +5 -3
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +1 -1
- package/dist/types/plugins/table/utils/collapse.d.ts +3 -3
- package/dist/types/plugins/table/utils/row-controls.d.ts +1 -1
- package/dist/types/plugins/table/utils/update-plugin-state-decorations.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +3 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-factory.d.ts +3 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +3 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-add-width.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +5 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +3 -3
- package/dist/types-ts4.5/plugins/table/utils/row-controls.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/utils/update-plugin-state-decorations.d.ts +1 -1
- package/package.json +7 -14
- package/report.api.md +0 -3
- package/src/__tests__/integration/sticky-header.ts +0 -94
- package/src/__tests__/unit/analytics.ts +20 -10
- package/src/__tests__/unit/keymap.ts +14 -21
- package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +12 -7
- package/src/__tests__/visual-regression/__image_snapshots__/sticky-header-ts-snapshot-test-table-sticky-header-should-align-with-table-cell-when-active-1-snap.png +2 -2
- package/src/__tests__/visual-regression/__image_snapshots__/sticky-header-ts-snapshot-test-table-sticky-header-should-align-with-table-cell-when-active-2-snap.png +2 -2
- package/src/__tests__/visual-regression/sticky-header.ts +3 -2
- package/src/plugins/table/index.tsx +12 -25
- package/src/plugins/table/nodeviews/table.tsx +5 -2
- package/src/plugins/table/pm-plugins/main.ts +1 -1
- package/src/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.ts +1 -1
- package/src/plugins/table/pm-plugins/table-resizing/utils/misc.ts +1 -1
- package/src/plugins/table/toolbar.tsx +1 -3
- package/src/plugins/table/ui/FloatingContextualMenu/index.tsx +1 -1
- package/src/plugins/table/utils/collapse.ts +3 -3
- package/src/plugins/table/utils/nodes.ts +3 -3
- package/src/plugins/table/utils/update-plugin-state-decorations.ts +1 -1
- package/tmp/api-report-tmp.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { EditorState, PluginKey, Transaction, ReadonlyTransaction } from 'prosemirror-state';
|
|
3
3
|
import { DecorationSet } from 'prosemirror-view';
|
|
4
|
-
export declare const pluginKey: PluginKey<any
|
|
4
|
+
export declare const pluginKey: PluginKey<any>;
|
|
5
5
|
export declare const getDecorations: (state: EditorState) => DecorationSet;
|
|
6
6
|
export declare const handleDocOrSelectionChanged: (tr: Transaction | ReadonlyTransaction, decorationSet: DecorationSet, oldState: EditorState) => DecorationSet;
|
|
7
|
-
export declare const createPlugin: () => SafePlugin<any
|
|
7
|
+
export declare const createPlugin: () => SafePlugin<any>;
|
|
@@ -5,4 +5,4 @@ import { PluginConfig } from '../types';
|
|
|
5
5
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
|
-
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, breakoutEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("../types").TablePluginState
|
|
8
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, breakoutEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("../types").TablePluginState>;
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
3
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, 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) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("../types").TablePluginState;
|
package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ interface SafariDeleteCompositionTextIssueWorkaroundPluginState {
|
|
|
10
10
|
renderSpan: boolean;
|
|
11
11
|
decorations: DecorationSet;
|
|
12
12
|
}
|
|
13
|
-
export declare const tableSafariDeleteCompositionTextIssueWorkaroundKey: PluginKey<SafariDeleteCompositionTextIssueWorkaroundPluginState
|
|
14
|
-
export declare const createPlugin: () => SafePlugin<SafariDeleteCompositionTextIssueWorkaroundPluginState
|
|
13
|
+
export declare const tableSafariDeleteCompositionTextIssueWorkaroundKey: PluginKey<SafariDeleteCompositionTextIssueWorkaroundPluginState>;
|
|
14
|
+
export declare const createPlugin: () => SafePlugin<SafariDeleteCompositionTextIssueWorkaroundPluginState>;
|
|
15
15
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/// <reference path="../../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
1
3
|
import { StickyPluginAction, StickyPluginState } from './types';
|
|
2
|
-
declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState
|
|
4
|
+
declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, 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) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
3
5
|
export { createPluginState, createCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { EventDispatcher, Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState: (() => never[]) | undefined, getEditorFeatureFlags: GetEditorFeatureFlags) => SafePlugin<import("./types").StickyPluginState
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState: (() => never[]) | undefined, getEditorFeatureFlags: GetEditorFeatureFlags) => SafePlugin<import("./types").StickyPluginState>;
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
declare const createPlugin: (dispatch: Dispatch, fullWidthEnabled: boolean) => SafePlugin<any
|
|
7
|
+
declare const createPlugin: (dispatch: Dispatch, fullWidthEnabled: boolean) => SafePlugin<any>;
|
|
8
8
|
export { createPlugin };
|
|
@@ -18,5 +18,5 @@ interface TableLocalIdPluginState {
|
|
|
18
18
|
/**
|
|
19
19
|
* Ensures uniqueness of `localId`s on tables being created or edited
|
|
20
20
|
*/
|
|
21
|
-
declare const createPlugin: (dispatch: Dispatch) => SafePlugin<TableLocalIdPluginState
|
|
21
|
+
declare const createPlugin: (dispatch: Dispatch) => SafePlugin<TableLocalIdPluginState>;
|
|
22
22
|
export { createPlugin };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/// <reference path="../../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
1
3
|
import { ColumnResizingPluginState } from '../../types';
|
|
2
|
-
export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState
|
|
3
|
-
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState
|
|
4
|
-
export declare const getPluginState: (state: import("prosemirror-state").EditorState
|
|
4
|
+
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) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
5
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState) => ColumnResizingPluginState)) => import("prosemirror-state").SafeStateField<ColumnResizingPluginState>;
|
|
6
|
+
export declare const getPluginState: (state: import("prosemirror-state").EditorState) => ColumnResizingPluginState;
|
|
@@ -3,4 +3,4 @@ import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
3
3
|
import { ColumnResizingPluginState } from '../../types';
|
|
4
4
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
-
export declare function createPlugin(dispatch: Dispatch<ColumnResizingPluginState>, { lastColumnResizable }: ColumnResizingPluginState, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI): SafePlugin<ColumnResizingPluginState
|
|
6
|
+
export declare function createPlugin(dispatch: Dispatch<ColumnResizingPluginState>, { lastColumnResizable }: ColumnResizingPluginState, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI): SafePlugin<ColumnResizingPluginState>;
|
|
@@ -7,7 +7,7 @@ import { EditorState } from 'prosemirror-state';
|
|
|
7
7
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
8
8
|
export declare function getLayoutSize(tableLayout: TableLayout, containerWidth: number | undefined, options: TableOptions): number;
|
|
9
9
|
export declare function getDefaultLayoutMaxWidth(containerWidth?: number): number;
|
|
10
|
-
export declare function pointsAtCell($pos: ResolvedPos
|
|
10
|
+
export declare function pointsAtCell($pos: ResolvedPos): false | PMNode | null | undefined;
|
|
11
11
|
export declare function currentColWidth(view: EditorView, cellPos: number, { colspan, colwidth }: CellAttributes): number;
|
|
12
12
|
export declare function domCellAround(target: HTMLElement | null): HTMLElement | null;
|
|
13
13
|
interface getTableMaxWidthProps {
|
|
@@ -17,4 +17,4 @@ export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions,
|
|
|
17
17
|
export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos) => ResizeState;
|
|
18
18
|
export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
|
|
19
19
|
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos) => void;
|
|
20
|
-
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos) => (tr: Transaction) => Transaction
|
|
20
|
+
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos) => (tr: Transaction) => Transaction;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NodeType, NodeRange
|
|
1
|
+
import { NodeType, NodeRange } from 'prosemirror-model';
|
|
2
2
|
import { Transaction, ReadonlyTransaction } from 'prosemirror-state';
|
|
3
|
-
interface IsTableCollapsibleResult
|
|
3
|
+
interface IsTableCollapsibleResult {
|
|
4
4
|
tableIsCollapsible: boolean;
|
|
5
5
|
range?: NodeRange;
|
|
6
6
|
findWrappingRes?: Array<{
|
|
7
|
-
type: NodeType
|
|
7
|
+
type: NodeType;
|
|
8
8
|
attrs?: {
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
} | null;
|
|
@@ -13,4 +13,4 @@ export declare const getRowDeleteButtonParams: (rowsHeights: Array<number | unde
|
|
|
13
13
|
} | null;
|
|
14
14
|
export declare const getRowsParams: (rowsHeights: Array<number | undefined>) => RowParams[];
|
|
15
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
|
|
16
|
+
export declare const copyPreviousRow: (schema: Schema) => (insertNewRowIndex: number) => (tr: Transaction) => Transaction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
2
|
import { Decoration, DecorationSet } from 'prosemirror-view';
|
|
3
3
|
import { TableDecorations } from '../types';
|
|
4
|
-
export declare const updatePluginStateDecorations: (state: EditorState
|
|
4
|
+
export declare const updatePluginStateDecorations: (state: EditorState, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
|
@@ -2,7 +2,7 @@ import { Transaction } from 'prosemirror-state';
|
|
|
2
2
|
import { Command } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
4
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
5
|
-
export declare function addColumnAt(getEditorContainerWidth: GetEditorContainerWidth): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction
|
|
5
|
+
export declare function addColumnAt(getEditorContainerWidth: GetEditorContainerWidth): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
6
6
|
export declare const addColumnBefore: (getEditorContainerWidth: GetEditorContainerWidth) => Command;
|
|
7
7
|
export declare const addColumnAfter: (getEditorContainerWidth: GetEditorContainerWidth) => Command;
|
|
8
8
|
export declare const insertColumn: (getEditorContainerWidth: GetEditorContainerWidth) => (column: number) => Command;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
5
4
|
import { PluginConfig } from './types';
|
|
6
5
|
import type { GetEditorFeatureFlags, NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
@@ -13,7 +12,6 @@ interface TablePluginOptions {
|
|
|
13
12
|
allowContextualMenu?: boolean;
|
|
14
13
|
fullWidthEnabled?: boolean;
|
|
15
14
|
wasFullWidthEnabled?: boolean;
|
|
16
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
17
15
|
editorSelectionAPI?: EditorSelectionAPI;
|
|
18
16
|
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
19
17
|
}
|
|
@@ -16,11 +16,11 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
16
16
|
getPos: getPosHandlerNode;
|
|
17
17
|
constructor(props: Props);
|
|
18
18
|
getContentDOM(): {
|
|
19
|
-
dom:
|
|
20
|
-
contentDOM?:
|
|
19
|
+
dom: HTMLElement;
|
|
20
|
+
contentDOM?: HTMLElement | undefined;
|
|
21
21
|
};
|
|
22
22
|
setDomAttrs(node: PmNode): void;
|
|
23
|
-
getNode: () => PmNode
|
|
23
|
+
getNode: () => PmNode;
|
|
24
24
|
render(props: Props, forwardRef: ForwardRef): JSX.Element;
|
|
25
25
|
private hasHoveredRows;
|
|
26
26
|
viewShouldUpdate(nextNode: PmNode): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { EditorState, PluginKey, Transaction, ReadonlyTransaction } from 'prosemirror-state';
|
|
3
3
|
import { DecorationSet } from 'prosemirror-view';
|
|
4
|
-
export declare const pluginKey: PluginKey<any
|
|
4
|
+
export declare const pluginKey: PluginKey<any>;
|
|
5
5
|
export declare const getDecorations: (state: EditorState) => DecorationSet;
|
|
6
6
|
export declare const handleDocOrSelectionChanged: (tr: Transaction | ReadonlyTransaction, decorationSet: DecorationSet, oldState: EditorState) => DecorationSet;
|
|
7
|
-
export declare const createPlugin: () => SafePlugin<any
|
|
7
|
+
export declare const createPlugin: () => SafePlugin<any>;
|
|
@@ -5,4 +5,4 @@ import { PluginConfig } from '../types';
|
|
|
5
5
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
|
-
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, breakoutEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("../types").TablePluginState
|
|
8
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, breakoutEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("../types").TablePluginState>;
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
3
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, 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) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("../types").TablePluginState;
|
|
@@ -10,6 +10,6 @@ interface SafariDeleteCompositionTextIssueWorkaroundPluginState {
|
|
|
10
10
|
renderSpan: boolean;
|
|
11
11
|
decorations: DecorationSet;
|
|
12
12
|
}
|
|
13
|
-
export declare const tableSafariDeleteCompositionTextIssueWorkaroundKey: PluginKey<SafariDeleteCompositionTextIssueWorkaroundPluginState
|
|
14
|
-
export declare const createPlugin: () => SafePlugin<SafariDeleteCompositionTextIssueWorkaroundPluginState
|
|
13
|
+
export declare const tableSafariDeleteCompositionTextIssueWorkaroundKey: PluginKey<SafariDeleteCompositionTextIssueWorkaroundPluginState>;
|
|
14
|
+
export declare const createPlugin: () => SafePlugin<SafariDeleteCompositionTextIssueWorkaroundPluginState>;
|
|
15
15
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/// <reference path="../../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
1
3
|
import { StickyPluginAction, StickyPluginState } from './types';
|
|
2
|
-
declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState
|
|
4
|
+
declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, 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) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
3
5
|
export { createPluginState, createCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { EventDispatcher, Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState: (() => never[]) | undefined, getEditorFeatureFlags: GetEditorFeatureFlags) => SafePlugin<import("./types").StickyPluginState
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState: (() => never[]) | undefined, getEditorFeatureFlags: GetEditorFeatureFlags) => SafePlugin<import("./types").StickyPluginState>;
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
declare const createPlugin: (dispatch: Dispatch, fullWidthEnabled: boolean) => SafePlugin<any
|
|
7
|
+
declare const createPlugin: (dispatch: Dispatch, fullWidthEnabled: boolean) => SafePlugin<any>;
|
|
8
8
|
export { createPlugin };
|
|
@@ -18,5 +18,5 @@ interface TableLocalIdPluginState {
|
|
|
18
18
|
/**
|
|
19
19
|
* Ensures uniqueness of `localId`s on tables being created or edited
|
|
20
20
|
*/
|
|
21
|
-
declare const createPlugin: (dispatch: Dispatch) => SafePlugin<TableLocalIdPluginState
|
|
21
|
+
declare const createPlugin: (dispatch: Dispatch) => SafePlugin<TableLocalIdPluginState>;
|
|
22
22
|
export { createPlugin };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/// <reference path="../../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
1
3
|
import { ColumnResizingPluginState } from '../../types';
|
|
2
|
-
export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState
|
|
3
|
-
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState
|
|
4
|
-
export declare const getPluginState: (state: import("prosemirror-state").EditorState
|
|
4
|
+
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) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
5
|
+
export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState) => ColumnResizingPluginState)) => import("prosemirror-state").SafeStateField<ColumnResizingPluginState>;
|
|
6
|
+
export declare const getPluginState: (state: import("prosemirror-state").EditorState) => ColumnResizingPluginState;
|
|
@@ -3,4 +3,4 @@ import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
3
3
|
import { ColumnResizingPluginState } from '../../types';
|
|
4
4
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
-
export declare function createPlugin(dispatch: Dispatch<ColumnResizingPluginState>, { lastColumnResizable }: ColumnResizingPluginState, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI): SafePlugin<ColumnResizingPluginState
|
|
6
|
+
export declare function createPlugin(dispatch: Dispatch<ColumnResizingPluginState>, { lastColumnResizable }: ColumnResizingPluginState, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI): SafePlugin<ColumnResizingPluginState>;
|
|
@@ -7,7 +7,7 @@ import { EditorState } from 'prosemirror-state';
|
|
|
7
7
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
8
8
|
export declare function getLayoutSize(tableLayout: TableLayout, containerWidth: number | undefined, options: TableOptions): number;
|
|
9
9
|
export declare function getDefaultLayoutMaxWidth(containerWidth?: number): number;
|
|
10
|
-
export declare function pointsAtCell($pos: ResolvedPos
|
|
10
|
+
export declare function pointsAtCell($pos: ResolvedPos): false | PMNode | null | undefined;
|
|
11
11
|
export declare function currentColWidth(view: EditorView, cellPos: number, { colspan, colwidth }: CellAttributes): number;
|
|
12
12
|
export declare function domCellAround(target: HTMLElement | null): HTMLElement | null;
|
|
13
13
|
interface getTableMaxWidthProps {
|
|
@@ -17,4 +17,4 @@ export declare const scale: (tableRef: HTMLTableElement, options: ScaleOptions,
|
|
|
17
17
|
export declare const scaleWithParent: (tableRef: HTMLTableElement, parentWidth: number, table: PMNode, start: number, domAtPos: DomAtPos) => ResizeState;
|
|
18
18
|
export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
|
|
19
19
|
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos) => void;
|
|
20
|
-
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos) => (tr: Transaction) => Transaction
|
|
20
|
+
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos) => (tr: Transaction) => Transaction;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NodeType, NodeRange
|
|
1
|
+
import { NodeType, NodeRange } from 'prosemirror-model';
|
|
2
2
|
import { Transaction, ReadonlyTransaction } from 'prosemirror-state';
|
|
3
|
-
interface IsTableCollapsibleResult
|
|
3
|
+
interface IsTableCollapsibleResult {
|
|
4
4
|
tableIsCollapsible: boolean;
|
|
5
5
|
range?: NodeRange;
|
|
6
6
|
findWrappingRes?: Array<{
|
|
7
|
-
type: NodeType
|
|
7
|
+
type: NodeType;
|
|
8
8
|
attrs?: {
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
} | null;
|
|
@@ -13,4 +13,4 @@ export declare const getRowDeleteButtonParams: (rowsHeights: Array<number | unde
|
|
|
13
13
|
} | null;
|
|
14
14
|
export declare const getRowsParams: (rowsHeights: Array<number | undefined>) => RowParams[];
|
|
15
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
|
|
16
|
+
export declare const copyPreviousRow: (schema: Schema) => (insertNewRowIndex: number) => (tr: Transaction) => Transaction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
2
|
import { Decoration, DecorationSet } from 'prosemirror-view';
|
|
3
3
|
import { TableDecorations } from '../types';
|
|
4
|
-
export declare const updatePluginStateDecorations: (state: EditorState
|
|
4
|
+
export declare const updatePluginStateDecorations: (state: EditorState, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"atlaskit:src": "src/index.ts",
|
|
24
24
|
"atlassian": {
|
|
25
|
-
"team": "Editor",
|
|
25
|
+
"team": "Editor: Jenga",
|
|
26
26
|
"singleton": true,
|
|
27
27
|
"releaseModel": "continuous"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^26.
|
|
30
|
+
"@atlaskit/adf-schema": "^26.1.0",
|
|
31
31
|
"@atlaskit/editor-common": "^74.15.0",
|
|
32
32
|
"@atlaskit/editor-palette": "1.5.1",
|
|
33
|
-
"@atlaskit/editor-plugin-analytics": "^0.0.
|
|
34
|
-
"@atlaskit/editor-plugin-content-insertion": "^0.0.
|
|
33
|
+
"@atlaskit/editor-plugin-analytics": "^0.0.5",
|
|
34
|
+
"@atlaskit/editor-plugin-content-insertion": "^0.0.5",
|
|
35
35
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
36
36
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
37
37
|
"@atlaskit/icon": "^21.12.0",
|
|
@@ -41,8 +41,6 @@
|
|
|
41
41
|
"@atlaskit/tooltip": "^17.8.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@emotion/react": "^11.7.1",
|
|
44
|
-
"@types/prosemirror-state": "^1.2.0",
|
|
45
|
-
"@types/prosemirror-view": "^1.9.0",
|
|
46
44
|
"classnames": "^2.2.5",
|
|
47
45
|
"lodash": "^4.17.21",
|
|
48
46
|
"memoize-one": "^6.0.0",
|
|
@@ -64,23 +62,18 @@
|
|
|
64
62
|
"devDependencies": {
|
|
65
63
|
"@af/editor-libra": "*",
|
|
66
64
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
67
|
-
"@atlaskit/
|
|
68
|
-
"@atlaskit/editor-core": "^185.8.0",
|
|
65
|
+
"@atlaskit/editor-core": "^185.9.0",
|
|
69
66
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
70
67
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
71
68
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
72
69
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
73
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
74
|
-
"@atlaskit/link-provider": "^1.6.0",
|
|
75
|
-
"@atlaskit/logo": "^13.14.0",
|
|
70
|
+
"@atlaskit/editor-test-helpers": "^18.9.0",
|
|
76
71
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
77
|
-
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
78
72
|
"@atlaskit/visual-regression": "*",
|
|
79
73
|
"@atlaskit/webdriver-runner": "*",
|
|
80
74
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
81
75
|
"@atlassian/feature-flags-test-utils": "^0.1.2",
|
|
82
76
|
"@testing-library/react": "^12.1.5",
|
|
83
|
-
"@types/prosemirror-history": "^1.0.1",
|
|
84
77
|
"prosemirror-history": "^1.1.3",
|
|
85
78
|
"raf-stub": "^2.0.1",
|
|
86
79
|
"typescript": "~4.9.5"
|
package/report.api.md
CHANGED
|
@@ -19,7 +19,6 @@ import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
|
19
19
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
20
20
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
21
21
|
import type { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
22
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
23
22
|
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
24
23
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
25
24
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
@@ -87,8 +86,6 @@ interface TablePluginOptions {
|
|
|
87
86
|
// (undocumented)
|
|
88
87
|
breakoutEnabled?: boolean;
|
|
89
88
|
// (undocumented)
|
|
90
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
91
|
-
// (undocumented)
|
|
92
89
|
editorSelectionAPI?: EditorSelectionAPI;
|
|
93
90
|
// (undocumented)
|
|
94
91
|
fullWidthEnabled?: boolean;
|
|
@@ -3,7 +3,6 @@ import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
|
3
3
|
import {
|
|
4
4
|
fullpage,
|
|
5
5
|
tableSelectors,
|
|
6
|
-
toggleBreakout,
|
|
7
6
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
8
7
|
import {
|
|
9
8
|
goToEditorTestingWDExample,
|
|
@@ -129,96 +128,3 @@ BrowserTestCase(
|
|
|
129
128
|
expect(await page.waitForSelector(tableSelectors.stickyTr)).toBeTruthy();
|
|
130
129
|
},
|
|
131
130
|
);
|
|
132
|
-
|
|
133
|
-
// FIXME: This test was automatically skipped due to failure on 28/05/2023: https://product-fabric.atlassian.net/browse/ED-18110
|
|
134
|
-
BrowserTestCase(
|
|
135
|
-
'Sticky header should correctly toggle on and off, after table is scrolled to the bottom and a column has been added',
|
|
136
|
-
{
|
|
137
|
-
// skip: ['safari']
|
|
138
|
-
skip: ['*'],
|
|
139
|
-
},
|
|
140
|
-
async (client: any, testName: string) => {
|
|
141
|
-
const page = await goToEditorTestingWDExample(
|
|
142
|
-
client,
|
|
143
|
-
'editor-plugin-table',
|
|
144
|
-
);
|
|
145
|
-
|
|
146
|
-
await mountEditor(page, {
|
|
147
|
-
appearance: fullpage.appearance,
|
|
148
|
-
defaultValue: JSON.stringify(stickyTable),
|
|
149
|
-
allowTables: {
|
|
150
|
-
advanced: true,
|
|
151
|
-
stickyHeaders: true,
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
await page.waitForSelector('table');
|
|
156
|
-
|
|
157
|
-
await scrollTo(page, window.innerHeight * 100);
|
|
158
|
-
|
|
159
|
-
await insertColumn(page, 'last');
|
|
160
|
-
|
|
161
|
-
expect(
|
|
162
|
-
await page.waitForSelector(tableSelectors.stickyTable, {}, true),
|
|
163
|
-
).toBeTruthy();
|
|
164
|
-
expect(
|
|
165
|
-
await page.waitForSelector(tableSelectors.stickyTr, {}, true),
|
|
166
|
-
).toBeTruthy();
|
|
167
|
-
|
|
168
|
-
// ED-16817 This checks for a bug where the table row would become not sticky
|
|
169
|
-
// but the numbered column header would stay sticky
|
|
170
|
-
const numberedCol = await page.$(tableSelectors.numberedColumnTopLeftCell);
|
|
171
|
-
const numberedColStyle = await numberedCol.getAttribute('style');
|
|
172
|
-
expect(!numberedColStyle.includes('top')).toBeTruthy();
|
|
173
|
-
},
|
|
174
|
-
);
|
|
175
|
-
|
|
176
|
-
// FIXME: This test was automatically skipped due to failure on 10/06/2023: https://product-fabric.atlassian.net/browse/ED-18761
|
|
177
|
-
BrowserTestCase(
|
|
178
|
-
'Sticky header should resize when the width of parent scroll container changes',
|
|
179
|
-
{
|
|
180
|
-
skip: ['*'],
|
|
181
|
-
},
|
|
182
|
-
async (client: any, testName: string) => {
|
|
183
|
-
const page = await goToEditorTestingWDExample(
|
|
184
|
-
client,
|
|
185
|
-
'editor-plugin-table',
|
|
186
|
-
);
|
|
187
|
-
|
|
188
|
-
await mountEditor(page, {
|
|
189
|
-
appearance: fullpage.appearance,
|
|
190
|
-
defaultValue: JSON.stringify(stickyTable),
|
|
191
|
-
allowTables: {
|
|
192
|
-
advanced: true,
|
|
193
|
-
stickyHeaders: true,
|
|
194
|
-
},
|
|
195
|
-
featureFlags: {
|
|
196
|
-
stickyHeadersOptimization: true,
|
|
197
|
-
},
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
await page.waitForSelector('table');
|
|
201
|
-
|
|
202
|
-
await toggleBreakout(page, 2);
|
|
203
|
-
|
|
204
|
-
await scrollTo(page, window.innerHeight * 100);
|
|
205
|
-
|
|
206
|
-
await page.execute(() => {
|
|
207
|
-
const editorScrollParentSelector = '.fabric-editor-popup-scroll-parent';
|
|
208
|
-
const editor = document.querySelector(
|
|
209
|
-
editorScrollParentSelector,
|
|
210
|
-
) as HTMLElement;
|
|
211
|
-
if (editor) {
|
|
212
|
-
editor.style.flexGrow = '0';
|
|
213
|
-
editor.style.width = '750px';
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
const table = await page.$(tableSelectors.stickyTable);
|
|
218
|
-
const tableWidth = await table.getSize();
|
|
219
|
-
const stickyHeader = await page.$(tableSelectors.stickyTr);
|
|
220
|
-
const stickyHeaderWidth = await stickyHeader.getSize();
|
|
221
|
-
|
|
222
|
-
expect(tableWidth.width).toEqual(stickyHeaderWidth.width);
|
|
223
|
-
},
|
|
224
|
-
);
|