@atlaskit/editor-plugin-table 17.0.1 → 17.1.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 +8 -0
- package/dist/cjs/nodeviews/TableComponent.js +45 -47
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +3 -1
- package/dist/cjs/nodeviews/TableContainer.js +4 -4
- package/dist/cjs/nodeviews/TableResizer.js +3 -3
- package/dist/cjs/nodeviews/table-node-views.js +1 -1
- package/dist/cjs/nodeviews/table.js +15 -10
- package/dist/cjs/pm-plugins/main.js +3 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +2 -2
- package/dist/cjs/tablePlugin.js +3 -3
- package/dist/es2019/nodeviews/TableComponent.js +8 -10
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +3 -1
- package/dist/es2019/nodeviews/TableContainer.js +4 -4
- package/dist/es2019/nodeviews/TableResizer.js +3 -3
- package/dist/es2019/nodeviews/table-node-views.js +1 -1
- package/dist/es2019/nodeviews/table.js +13 -9
- package/dist/es2019/pm-plugins/main.js +3 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +2 -2
- package/dist/es2019/tablePlugin.js +3 -3
- package/dist/esm/nodeviews/TableComponent.js +45 -47
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +3 -1
- package/dist/esm/nodeviews/TableContainer.js +4 -4
- package/dist/esm/nodeviews/TableResizer.js +3 -3
- package/dist/esm/nodeviews/table-node-views.js +1 -1
- package/dist/esm/nodeviews/table.js +15 -10
- package/dist/esm/pm-plugins/main.js +3 -2
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +2 -2
- package/dist/esm/tablePlugin.js +3 -3
- package/dist/types/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +2 -1
- package/dist/types/nodeviews/TableContainer.d.ts +4 -4
- package/dist/types/nodeviews/TableResizer.d.ts +2 -2
- package/dist/types/nodeviews/table-node-views.d.ts +1 -0
- package/dist/types/nodeviews/table.d.ts +1 -1
- package/dist/types/nodeviews/types.d.ts +1 -0
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/scale-table.d.ts +1 -1
- package/dist/types/tablePluginType.d.ts +6 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +4 -4
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/table-node-views.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/table.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/types.d.ts +1 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +1 -1
- package/dist/types-ts4.5/tablePluginType.d.ts +6 -0
- package/dist/types-ts4.5/types/index.d.ts +1 -0
- package/package.json +5 -2
|
@@ -7,6 +7,7 @@ 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
|
+
allowFixedColumnWidthOption?: boolean;
|
|
10
11
|
attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
|
|
11
12
|
containerWidth: number;
|
|
12
13
|
disabled?: boolean;
|
|
@@ -18,7 +19,6 @@ interface TableResizerProps {
|
|
|
18
19
|
isFullWidthModeEnabled?: boolean;
|
|
19
20
|
isTableAlignmentEnabled?: boolean;
|
|
20
21
|
isTableScalingEnabled?: boolean;
|
|
21
|
-
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
22
22
|
isWholeTableInDanger?: boolean;
|
|
23
23
|
lineLength: number;
|
|
24
24
|
maxWidth: number | string;
|
|
@@ -31,5 +31,5 @@ interface TableResizerProps {
|
|
|
31
31
|
updateWidth: (width: number) => void;
|
|
32
32
|
width: number;
|
|
33
33
|
}
|
|
34
|
-
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled,
|
|
34
|
+
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, allowFixedColumnWidthOption, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, isCommentEditor, disabled, }: PropsWithChildren<TableResizerProps>) => React.JSX.Element;
|
|
35
35
|
export {};
|
|
@@ -9,6 +9,7 @@ import TableCell from './TableCell';
|
|
|
9
9
|
import TableRow from './TableRow';
|
|
10
10
|
import TableRowNativeStickyWithFallback from './TableRowNativeStickyWithFallback';
|
|
11
11
|
type TableViewOptions = {
|
|
12
|
+
allowFixedColumnWidthOption?: boolean;
|
|
12
13
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
13
14
|
eventDispatcher: EventDispatcher;
|
|
14
15
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
@@ -41,5 +41,5 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
41
41
|
}): boolean;
|
|
42
42
|
destroy(): void;
|
|
43
43
|
}
|
|
44
|
-
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, dispatchAnalyticsEvent: DispatchAnalyticsEvent, pluginInjectionApi?: PluginInjectionAPI, isCommentEditor?: boolean, isChromelessEditor?: boolean) => NodeView;
|
|
44
|
+
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, dispatchAnalyticsEvent: DispatchAnalyticsEvent, pluginInjectionApi?: PluginInjectionAPI, isCommentEditor?: boolean, isChromelessEditor?: boolean, allowFixedColumnWidthOption?: boolean) => NodeView;
|
|
45
45
|
export {};
|
|
@@ -5,4 +5,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { PluginConfig, PluginInjectionAPI } from '../types';
|
|
8
|
-
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, nodeViewPortalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean) => SafePlugin<import("../types").TablePluginState>;
|
|
8
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, nodeViewPortalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean, allowFixedColumnWidthOption?: boolean) => SafePlugin<import("../types").TablePluginState>;
|
|
@@ -15,6 +15,6 @@ interface ScaleOptions {
|
|
|
15
15
|
start: number;
|
|
16
16
|
}
|
|
17
17
|
export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
|
|
18
|
-
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean,
|
|
18
|
+
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean, allowFixedColumnWidthOption?: boolean, isCommentEditor?: boolean) => void;
|
|
19
19
|
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, api: PluginInjectionAPI | undefined | null, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (tr: Transaction) => Transaction;
|
|
20
20
|
export {};
|
|
@@ -17,6 +17,12 @@ import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
17
17
|
import type { PluginConfig, TableSharedState } from './types';
|
|
18
18
|
export interface TablePluginOptions {
|
|
19
19
|
allowContextualMenu?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Enables the fixed column width option.
|
|
22
|
+
* When enabled, users can choose to apply fixed widths to table columns and these widths won't scale with viewport changes.
|
|
23
|
+
* Note: This feature requires ADF schema changes to be supported.
|
|
24
|
+
*/
|
|
25
|
+
allowFixedColumnWidthOption?: boolean;
|
|
20
26
|
/**
|
|
21
27
|
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-49683 Internal documentation for deprecation (no external access)}
|
|
22
28
|
* Deprecating this prop to enable drag and drop in tables by default.
|
|
@@ -60,6 +60,7 @@ export interface PluginConfig {
|
|
|
60
60
|
allowColumnSorting?: boolean;
|
|
61
61
|
allowControls?: boolean;
|
|
62
62
|
allowDistributeColumns?: boolean;
|
|
63
|
+
allowFixedColumnWidthOption?: boolean;
|
|
63
64
|
allowHeaderColumn?: boolean;
|
|
64
65
|
allowHeaderRow?: boolean;
|
|
65
66
|
allowMergeCells?: boolean;
|
|
@@ -12,6 +12,7 @@ import type { TableOptions } from './types';
|
|
|
12
12
|
interface ComponentProps {
|
|
13
13
|
allowColumnResizing?: boolean;
|
|
14
14
|
allowControls?: boolean;
|
|
15
|
+
allowFixedColumnWidthOption?: boolean;
|
|
15
16
|
allowTableAlignment?: boolean;
|
|
16
17
|
allowTableResizing?: boolean;
|
|
17
18
|
containerWidth: EditorContainerWidth;
|
|
@@ -10,6 +10,7 @@ type ForwardRef = (node: HTMLElement | null) => any;
|
|
|
10
10
|
type TableComponentWithSharedStateProps = {
|
|
11
11
|
allowColumnResizing?: boolean;
|
|
12
12
|
allowControls?: boolean;
|
|
13
|
+
allowFixedColumnWidthOption?: boolean;
|
|
13
14
|
allowTableAlignment?: boolean;
|
|
14
15
|
allowTableResizing?: boolean;
|
|
15
16
|
api?: PluginInjectionAPI;
|
|
@@ -25,5 +26,5 @@ type TableComponentWithSharedStateProps = {
|
|
|
25
26
|
/**
|
|
26
27
|
* Use useSharedPluginState to control re-renders from plugin dependencies
|
|
27
28
|
*/
|
|
28
|
-
export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, }: TableComponentWithSharedStateProps) => React.JSX.Element;
|
|
29
|
+
export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, allowFixedColumnWidthOption, }: TableComponentWithSharedStateProps) => React.JSX.Element;
|
|
29
30
|
export {};
|
|
@@ -5,6 +5,7 @@ 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
|
+
allowFixedColumnWidthOption?: boolean;
|
|
8
9
|
className: string;
|
|
9
10
|
containerWidth: number;
|
|
10
11
|
editorView: EditorView;
|
|
@@ -14,7 +15,6 @@ type ResizableTableContainerProps = {
|
|
|
14
15
|
isResizing?: boolean;
|
|
15
16
|
isTableAlignmentEnabled?: boolean;
|
|
16
17
|
isTableScalingEnabled?: boolean;
|
|
17
|
-
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
18
18
|
isWholeTableInDanger?: boolean;
|
|
19
19
|
lineLength: number;
|
|
20
20
|
node: PMNode;
|
|
@@ -23,8 +23,9 @@ type ResizableTableContainerProps = {
|
|
|
23
23
|
tableRef: HTMLTableElement;
|
|
24
24
|
tableWrapperHeight?: number;
|
|
25
25
|
};
|
|
26
|
-
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled,
|
|
26
|
+
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, allowFixedColumnWidthOption, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<ResizableTableContainerProps>) => React.JSX.Element>;
|
|
27
27
|
type TableContainerProps = {
|
|
28
|
+
allowFixedColumnWidthOption?: boolean;
|
|
28
29
|
className: string;
|
|
29
30
|
containerWidth: EditorContainerWidth;
|
|
30
31
|
editorView: EditorView;
|
|
@@ -36,7 +37,6 @@ type TableContainerProps = {
|
|
|
36
37
|
isTableAlignmentEnabled?: boolean;
|
|
37
38
|
isTableResizingEnabled: boolean | undefined;
|
|
38
39
|
isTableScalingEnabled?: boolean;
|
|
39
|
-
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
40
40
|
isWholeTableInDanger?: boolean;
|
|
41
41
|
node: PMNode;
|
|
42
42
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
@@ -44,5 +44,5 @@ type TableContainerProps = {
|
|
|
44
44
|
tableRef: HTMLTableElement;
|
|
45
45
|
tableWrapperHeight?: number;
|
|
46
46
|
};
|
|
47
|
-
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled,
|
|
47
|
+
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, allowFixedColumnWidthOption, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<TableContainerProps>) => React.JSX.Element;
|
|
48
48
|
export {};
|
|
@@ -7,6 +7,7 @@ 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
|
+
allowFixedColumnWidthOption?: boolean;
|
|
10
11
|
attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
|
|
11
12
|
containerWidth: number;
|
|
12
13
|
disabled?: boolean;
|
|
@@ -18,7 +19,6 @@ interface TableResizerProps {
|
|
|
18
19
|
isFullWidthModeEnabled?: boolean;
|
|
19
20
|
isTableAlignmentEnabled?: boolean;
|
|
20
21
|
isTableScalingEnabled?: boolean;
|
|
21
|
-
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
22
22
|
isWholeTableInDanger?: boolean;
|
|
23
23
|
lineLength: number;
|
|
24
24
|
maxWidth: number | string;
|
|
@@ -31,5 +31,5 @@ interface TableResizerProps {
|
|
|
31
31
|
updateWidth: (width: number) => void;
|
|
32
32
|
width: number;
|
|
33
33
|
}
|
|
34
|
-
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled,
|
|
34
|
+
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, allowFixedColumnWidthOption, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, isCommentEditor, disabled, }: PropsWithChildren<TableResizerProps>) => React.JSX.Element;
|
|
35
35
|
export {};
|
|
@@ -9,6 +9,7 @@ import TableCell from './TableCell';
|
|
|
9
9
|
import TableRow from './TableRow';
|
|
10
10
|
import TableRowNativeStickyWithFallback from './TableRowNativeStickyWithFallback';
|
|
11
11
|
type TableViewOptions = {
|
|
12
|
+
allowFixedColumnWidthOption?: boolean;
|
|
12
13
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
13
14
|
eventDispatcher: EventDispatcher;
|
|
14
15
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
@@ -41,5 +41,5 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
41
41
|
}): boolean;
|
|
42
42
|
destroy(): void;
|
|
43
43
|
}
|
|
44
|
-
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, dispatchAnalyticsEvent: DispatchAnalyticsEvent, pluginInjectionApi?: PluginInjectionAPI, isCommentEditor?: boolean, isChromelessEditor?: boolean) => NodeView;
|
|
44
|
+
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, dispatchAnalyticsEvent: DispatchAnalyticsEvent, pluginInjectionApi?: PluginInjectionAPI, isCommentEditor?: boolean, isChromelessEditor?: boolean, allowFixedColumnWidthOption?: boolean) => NodeView;
|
|
45
45
|
export {};
|
|
@@ -5,4 +5,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { PluginConfig, PluginInjectionAPI } from '../types';
|
|
8
|
-
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, nodeViewPortalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean) => SafePlugin<import("../types").TablePluginState>;
|
|
8
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, nodeViewPortalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean, isChromelessEditor?: boolean, allowFixedColumnWidthOption?: boolean) => SafePlugin<import("../types").TablePluginState>;
|
|
@@ -15,6 +15,6 @@ interface ScaleOptions {
|
|
|
15
15
|
start: number;
|
|
16
16
|
}
|
|
17
17
|
export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
|
|
18
|
-
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean,
|
|
18
|
+
export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean, allowFixedColumnWidthOption?: boolean, isCommentEditor?: boolean) => void;
|
|
19
19
|
export declare const scaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, api: PluginInjectionAPI | undefined | null, isTableScalingEnabledOnCurrentTable?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => (tr: Transaction) => Transaction;
|
|
20
20
|
export {};
|
|
@@ -17,6 +17,12 @@ import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
17
17
|
import type { PluginConfig, TableSharedState } from './types';
|
|
18
18
|
export interface TablePluginOptions {
|
|
19
19
|
allowContextualMenu?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Enables the fixed column width option.
|
|
22
|
+
* When enabled, users can choose to apply fixed widths to table columns and these widths won't scale with viewport changes.
|
|
23
|
+
* Note: This feature requires ADF schema changes to be supported.
|
|
24
|
+
*/
|
|
25
|
+
allowFixedColumnWidthOption?: boolean;
|
|
20
26
|
/**
|
|
21
27
|
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-49683 Internal documentation for deprecation (no external access)}
|
|
22
28
|
* Deprecating this prop to enable drag and drop in tables by default.
|
|
@@ -60,6 +60,7 @@ export interface PluginConfig {
|
|
|
60
60
|
allowColumnSorting?: boolean;
|
|
61
61
|
allowControls?: boolean;
|
|
62
62
|
allowDistributeColumns?: boolean;
|
|
63
|
+
allowFixedColumnWidthOption?: boolean;
|
|
63
64
|
allowHeaderColumn?: boolean;
|
|
64
65
|
allowHeaderRow?: boolean;
|
|
65
66
|
allowMergeCells?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "17.0
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
58
58
|
"@atlaskit/primitives": "^17.1.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^16.35.0",
|
|
61
61
|
"@atlaskit/toggle": "^15.2.0",
|
|
62
62
|
"@atlaskit/tokens": "^10.1.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.14.0",
|
|
@@ -177,6 +177,9 @@
|
|
|
177
177
|
},
|
|
178
178
|
"platform_editor_enable_table_scaling": {
|
|
179
179
|
"type": "boolean"
|
|
180
|
+
},
|
|
181
|
+
"platform_editor_table_fixed_column_width_prop": {
|
|
182
|
+
"type": "boolean"
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
185
|
}
|