@atlaskit/editor-plugin-table 1.6.2 → 1.6.4
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 +13 -0
- package/dist/cjs/plugins/table/index.js +2 -1
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -1
- package/dist/cjs/plugins/table/types.js +1 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/FixedButton.js +133 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +73 -128
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/index.js +2 -1
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -1
- package/dist/es2019/plugins/table/types.js +1 -0
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/FixedButton.js +120 -0
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +76 -108
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/index.js +2 -1
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -1
- package/dist/esm/plugins/table/types.js +1 -0
- package/dist/esm/plugins/table/ui/FloatingContextualButton/FixedButton.js +118 -0
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +73 -129
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/table/types.d.ts +1 -0
- package/dist/types/plugins/table/ui/FloatingContextualButton/FixedButton.d.ts +23 -0
- package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +1 -9
- package/dist/types-ts4.5/plugins/table/types.d.ts +1 -0
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/FixedButton.d.ts +23 -0
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +1 -9
- package/package.json +7 -6
- package/src/__tests__/playwright/__fixtures__/base-adfs.ts +1486 -0
- package/src/__tests__/playwright/extensions.spec.ts +67 -0
- package/src/__tests__/unit/commands.ts +2 -0
- package/src/__tests__/unit/event-handlers.ts +2 -0
- package/src/__tests__/unit/index.ts +2 -0
- package/src/__tests__/unit/ui/FixedButton.tsx +214 -0
- package/src/__tests__/visual-regression/sticky-header.ts +2 -1
- package/src/plugins/table/index.tsx +1 -0
- package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +2 -1
- package/src/plugins/table/types.ts +1 -0
- package/src/plugins/table/ui/FloatingContextualButton/FixedButton.tsx +175 -0
- package/src/plugins/table/ui/FloatingContextualButton/index.tsx +41 -95
|
@@ -272,6 +272,7 @@ export declare const TableCssClassName: {
|
|
|
272
272
|
CONTEXTUAL_SUBMENU: string;
|
|
273
273
|
CONTEXTUAL_MENU_BUTTON_WRAP: string;
|
|
274
274
|
CONTEXTUAL_MENU_BUTTON: string;
|
|
275
|
+
CONTEXTUAL_MENU_BUTTON_FIXED: string;
|
|
275
276
|
CONTEXTUAL_MENU_ICON: string;
|
|
276
277
|
SELECTED_CELL: string;
|
|
277
278
|
NODEVIEW_WRAPPER: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
3
|
+
export declare const BUTTON_WIDTH = 20;
|
|
4
|
+
export interface Props {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
mountTo: HTMLElement;
|
|
7
|
+
offset: number;
|
|
8
|
+
stickyHeader: RowStickyState;
|
|
9
|
+
targetCellPosition: number;
|
|
10
|
+
targetCellRef: HTMLElement;
|
|
11
|
+
tableWrapper: HTMLElement;
|
|
12
|
+
isContextualMenuOpen: boolean | undefined;
|
|
13
|
+
}
|
|
14
|
+
interface CalcLeftPosData {
|
|
15
|
+
buttonWidth: number;
|
|
16
|
+
cellRectLeft: number;
|
|
17
|
+
cellRefWidth: number;
|
|
18
|
+
offset: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const calcLeftPos: ({ buttonWidth, cellRectLeft, cellRefWidth, offset, }: CalcLeftPosData) => number;
|
|
21
|
+
export declare const calcObserverTargetMargin: (tableWrapper: HTMLElement, fixedButtonRefCurrent: HTMLElement) => number;
|
|
22
|
+
export declare const FixedButton: ({ children, isContextualMenuOpen, mountTo, offset, stickyHeader, tableWrapper, targetCellPosition, targetCellRef, }: Props) => React.ReactPortal;
|
|
23
|
+
export default FixedButton;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { jsx } from '@emotion/react';
|
|
4
2
|
import { EditorView } from 'prosemirror-view';
|
|
5
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
6
3
|
import { TableLayout } from '@atlaskit/adf-schema';
|
|
7
4
|
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
8
5
|
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
9
6
|
import { Node as PMNode } from 'prosemirror-model';
|
|
10
7
|
export interface Props {
|
|
11
8
|
editorView: EditorView;
|
|
9
|
+
tableWrapper?: HTMLElement;
|
|
12
10
|
tableNode?: PMNode;
|
|
13
11
|
targetCellPosition: number;
|
|
14
12
|
isContextualMenuOpen?: boolean;
|
|
@@ -20,10 +18,4 @@ export interface Props {
|
|
|
20
18
|
stickyHeader?: RowStickyState;
|
|
21
19
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
22
20
|
}
|
|
23
|
-
export declare class FloatingContextualButtonInner extends React.Component<Props & WrappedComponentProps, any> {
|
|
24
|
-
static displayName: string;
|
|
25
|
-
render(): jsx.JSX.Element | null;
|
|
26
|
-
shouldComponentUpdate(nextProps: Props): boolean;
|
|
27
|
-
private handleClick;
|
|
28
|
-
}
|
|
29
21
|
export default function (props: Props): jsx.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"releaseModel": "continuous"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/adf-schema": "^25.
|
|
30
|
-
"@atlaskit/editor-common": "^74.
|
|
29
|
+
"@atlaskit/adf-schema": "^25.9.0",
|
|
30
|
+
"@atlaskit/editor-common": "^74.8.0",
|
|
31
31
|
"@atlaskit/editor-palette": "1.5.0",
|
|
32
32
|
"@atlaskit/editor-plugin-analytics": "^0.0.2",
|
|
33
33
|
"@atlaskit/editor-plugin-content-insertion": "^0.0.2",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/icon": "^21.12.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
38
38
|
"@atlaskit/theme": "^12.5.0",
|
|
39
|
-
"@atlaskit/tokens": "^1.
|
|
39
|
+
"@atlaskit/tokens": "^1.8.0",
|
|
40
40
|
"@atlaskit/tooltip": "^17.8.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1",
|
|
@@ -61,14 +61,15 @@
|
|
|
61
61
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
+
"@af/editor-libra": "*",
|
|
64
65
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
65
|
-
"@atlaskit/button": "^16.
|
|
66
|
+
"@atlaskit/button": "^16.8.0",
|
|
66
67
|
"@atlaskit/editor-core": "^185.2.0",
|
|
67
68
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
68
69
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
69
70
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
70
71
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
71
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
72
|
+
"@atlaskit/editor-test-helpers": "^18.7.0",
|
|
72
73
|
"@atlaskit/link-provider": "^1.6.0",
|
|
73
74
|
"@atlaskit/logo": "^13.14.0",
|
|
74
75
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|