@atlaskit/editor-plugin-table 31.0.0 → 31.0.2
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 +14 -0
- package/dist/cjs/nodeviews/TableContainer.js +1 -1
- package/dist/cjs/nodeviews/TableResizer.js +1 -1
- package/dist/cjs/pm-plugins/commands/hover.js +2 -2
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +1 -1
- package/dist/cjs/pm-plugins/table-resizing/plugin-factory.js +0 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +1 -1
- package/dist/cjs/pm-plugins/utils/snapping.js +1 -1
- package/dist/cjs/tablePlugin.js +1 -1
- package/dist/cjs/ui/ContentComponent.js +1 -1
- package/dist/cjs/ui/DragHandle/index.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/cjs/ui/common-styles.js +3 -3
- package/dist/cjs/ui/toolbar.js +1 -1
- package/dist/es2019/entry-points/table-plugin.js +1 -0
- package/dist/es2019/entry-points/types.js +1 -0
- package/dist/es2019/entry-points/ui-common-styles.js +1 -0
- package/dist/es2019/nodeviews/TableContainer.js +1 -1
- package/dist/es2019/nodeviews/TableResizer.js +1 -1
- package/dist/es2019/pm-plugins/analytics/commands.js +2 -2
- package/dist/es2019/pm-plugins/commands/hover.js +2 -2
- package/dist/es2019/pm-plugins/commands/referentiality.js +2 -2
- package/dist/es2019/pm-plugins/drag-and-drop/commands.js +2 -2
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +2 -2
- package/dist/es2019/pm-plugins/drag-and-drop/utils/autoscrollers.js +2 -2
- package/dist/es2019/pm-plugins/table-resizing/plugin-factory.js +4 -4
- package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +1 -1
- package/dist/es2019/pm-plugins/utils/snapping.js +1 -1
- package/dist/es2019/tablePlugin.js +1 -1
- package/dist/es2019/ui/ContentComponent.js +1 -1
- package/dist/es2019/ui/DragHandle/index.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +0 -1
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +1 -0
- package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +1 -0
- package/dist/es2019/ui/FloatingDragMenu/styles.js +1 -0
- package/dist/es2019/ui/common-styles.js +5 -5
- package/dist/es2019/ui/toolbar.js +1 -1
- package/dist/esm/entry-points/table-plugin.js +1 -0
- package/dist/esm/entry-points/types.js +1 -0
- package/dist/esm/entry-points/ui-common-styles.js +1 -0
- package/dist/esm/nodeviews/TableContainer.js +1 -1
- package/dist/esm/nodeviews/TableResizer.js +1 -1
- package/dist/esm/pm-plugins/analytics/commands.js +2 -2
- package/dist/esm/pm-plugins/commands/hover.js +2 -2
- package/dist/esm/pm-plugins/commands/referentiality.js +2 -2
- package/dist/esm/pm-plugins/drag-and-drop/commands.js +2 -2
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +2 -2
- package/dist/esm/pm-plugins/drag-and-drop/utils/autoscrollers.js +2 -2
- package/dist/esm/pm-plugins/table-resizing/plugin-factory.js +4 -4
- package/dist/esm/pm-plugins/table-resizing/utils/misc.js +1 -1
- package/dist/esm/pm-plugins/utils/snapping.js +1 -1
- package/dist/esm/tablePlugin.js +1 -1
- package/dist/esm/ui/ContentComponent.js +1 -1
- package/dist/esm/ui/DragHandle/index.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +0 -1
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +1 -0
- package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +1 -0
- package/dist/esm/ui/FloatingDragMenu/styles.js +1 -0
- package/dist/esm/ui/common-styles.js +3 -3
- package/dist/esm/ui/toolbar.js +1 -1
- package/dist/types/pm-plugins/analytics/commands.d.ts +1 -1
- package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
- package/dist/types/pm-plugins/commands/hover.d.ts +1 -1
- package/dist/types/pm-plugins/commands/referentiality.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/plugin-factory.d.ts +2 -2
- package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +4 -0
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isVerticalPosition } from '@atlaskit/editor-common/guideline';
|
|
2
2
|
import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorMaxWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
5
|
const numberOfLanesInDefaultLayoutWidth = 12;
|
|
6
6
|
const calculateSubSnappingWidths = (totalLanes, totalWidth) => new Array(Math.round(totalLanes / 2) - 1).fill(totalWidth / totalLanes).map((v, i) => v * (i + 1) * 2);
|
|
7
7
|
export const calculateDefaultSnappings = (lengthOffset = 0) => [...calculateSubSnappingWidths(numberOfLanesInDefaultLayoutWidth, akEditorDefaultLayoutWidth + lengthOffset), akEditorDefaultLayoutWidth + lengthOffset, akEditorCalculatedWideLayoutWidth + lengthOffset, akEditorFullWidthLayoutWidth + lengthOffset];
|
|
@@ -13,9 +13,9 @@ import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/ut
|
|
|
13
13
|
import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
|
|
14
14
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
16
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
18
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
19
|
import { tableNodeSpecWithFixedToDOM } from './nodeviews/toDOM';
|
|
20
20
|
import { createPlugin as createActiveCellHighlightPlugin } from './pm-plugins/active-cell-highlight/plugin';
|
|
21
21
|
import { createPlugin as createTableAnalyticsPlugin } from './pm-plugins/analytics/plugin';
|
|
@@ -5,8 +5,8 @@ import { getDomRefFromSelection } from '@atlaskit/editor-common/get-dom-ref-from
|
|
|
5
5
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { ResizerBreakoutModeLabel } from '@atlaskit/editor-common/resizer';
|
|
7
7
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
9
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
10
|
import FloatingContextualButton from './FloatingContextualButton';
|
|
11
11
|
import FloatingContextualMenu from './FloatingContextualMenu';
|
|
12
12
|
import FloatingDragMenu from './FloatingDragMenu';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/no-html-button */
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import classnames from 'classnames';
|
|
5
4
|
import ReactDOM from 'react-dom';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
6
|
import { injectIntl } from 'react-intl';
|
|
7
7
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
8
8
|
import { tableMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import rafSchedule from 'raf-schd';
|
|
3
2
|
import { createPortal } from 'react-dom';
|
|
3
|
+
import rafSchedule from 'raf-schd';
|
|
4
4
|
import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { TableCssClassName as ClassName } from '../../types';
|
|
6
6
|
import { insertColumnButtonOffset } from '../common-styles';
|
|
@@ -21,7 +21,6 @@ import { toggleActiveTableMenu, toggleContextualMenu } from '../../pm-plugins/co
|
|
|
21
21
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
22
22
|
import { isNativeStickySupported } from '../../pm-plugins/utils/sticky-header';
|
|
23
23
|
import { TableCssClassName as ClassName } from '../../types';
|
|
24
|
-
|
|
25
24
|
// Ignored via go/ees005
|
|
26
25
|
// eslint-disable-next-line import/no-named-as-default
|
|
27
26
|
import FixedButton from './FixedButton';
|
|
@@ -35,8 +35,8 @@ import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
|
|
|
35
35
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
36
36
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
37
37
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
38
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
39
38
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
39
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
40
40
|
import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, setFocusToCellMenu, toggleContextualMenu } from '../../pm-plugins/commands';
|
|
41
41
|
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
|
|
42
42
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
3
|
+
|
|
3
4
|
import React, { useCallback, useState } from 'react';
|
|
4
5
|
import { DropList, Popup } from '@atlaskit/editor-common/ui';
|
|
5
6
|
import { ArrowKeyNavigationProvider, ArrowKeyNavigationType, DropdownMenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 */
|
|
2
|
+
|
|
2
3
|
import { css } from '@emotion/react';
|
|
3
4
|
import { tableBackgroundBorderColor } from '@atlaskit/adf-schema/tableNodes';
|
|
4
5
|
import { TableCssClassName as ClassName } from '../../types';
|
|
@@ -14,7 +14,6 @@ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
|
14
14
|
import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
17
|
import { SORTING_ICON_CLASS_NAME } from '../pm-plugins/view-mode-sort/consts';
|
|
19
18
|
import { TableCssClassName as ClassName } from '../types';
|
|
20
19
|
import { aboveNativeStickyHeaderZIndex, belowNativeStickyHeaderZIndex, columnControlsDecorationHeight, dragRowControlsWidth, nativeStickyHeaderZIndex, resizeHandlerAreaWidth, resizeHandlerZIndex, resizeLineWidth, rowControlsZIndex, stickyHeaderBorderBottomWidth, stickyRowOffsetTop, stickyRowZIndex, tableBorderColor, tableBorderDeleteColor, tableBorderRadiusSize, tableBorderSelectedColor, tableCellBackgroundColor, tableCellDeleteColor, tableCellSelectedColor, tableColumnControlsHeight, tableControlsSpacing, tableHeaderCellBackgroundColor, tableHeaderCellSelectedColor, tableInsertColumnButtonSize, tablePadding, tableScrollbarOffset, tableTextColor, tableToolbarDeleteColor, tableToolbarSelectedColor, tableToolbarSize } from './consts';
|
|
@@ -27,6 +26,7 @@ const cornerControlHeight = tableToolbarSize + 1;
|
|
|
27
26
|
that is aligned to the right edge initially on hover of the top right column control when table overflown,
|
|
28
27
|
its center should be aligned with the edge
|
|
29
28
|
*/
|
|
29
|
+
|
|
30
30
|
export const insertColumnButtonOffset = tableInsertColumnButtonSize / 2;
|
|
31
31
|
export const tableRowHeight = 44;
|
|
32
32
|
|
|
@@ -1017,7 +1017,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
|
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
1019
|
|
|
1020
|
-
|
|
1020
|
+
/* Apply numbered column styling when table is selected via text selection (e.g., block menu) */
|
|
1021
1021
|
.${akEditorSelectedNodeClassName} {
|
|
1022
1022
|
.${ClassName.NUMBERED_COLUMN} {
|
|
1023
1023
|
.${ClassName.NUMBERED_COLUMN_BUTTON} {
|
|
@@ -1025,7 +1025,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
|
|
|
1025
1025
|
${hideNativeBrowserTextSelectionStyles}
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
|
-
}
|
|
1028
|
+
}
|
|
1029
1029
|
|
|
1030
1030
|
:not(.${ClassName.IS_RESIZING}) .${ClassName.WITH_CONTROLS} {
|
|
1031
1031
|
.${ClassName.NUMBERED_COLUMN_BUTTON}:not(.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}) {
|
|
@@ -1044,7 +1044,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
|
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
-
|
|
1047
|
+
.tableView-content-wrap.danger {
|
|
1048
1048
|
:not(.${ClassName.IS_RESIZING}) .${ClassName.WITH_CONTROLS} {
|
|
1049
1049
|
.${ClassName.NUMBERED_COLUMN_BUTTON} {
|
|
1050
1050
|
background-color: ${tableToolbarDeleteColor};
|
|
@@ -1055,7 +1055,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
|
|
|
1055
1055
|
z-index: ${akEditorUnitZIndex};
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
}
|
|
1058
|
+
}
|
|
1059
1059
|
|
|
1060
1060
|
/* Table */
|
|
1061
1061
|
.${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
@@ -31,8 +31,8 @@ import ShrinkHorizontalIcon from '@atlaskit/icon/core/shrink-horizontal';
|
|
|
31
31
|
import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
|
|
32
32
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
33
33
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
34
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
35
34
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
35
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
36
36
|
import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, hoverTable, removeDescendantNodes } from '../pm-plugins/commands';
|
|
37
37
|
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, deleteTableWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, setTableAlignmentWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics, toggleFixedColumnWidthsOptionAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics, wrapTableInExpandWithAnalytics } from '../pm-plugins/commands/commands-with-analytics';
|
|
38
38
|
import { getPluginState as getDragDropPluginState } from '../pm-plugins/drag-and-drop/plugin-factory';
|
|
@@ -7,8 +7,8 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
7
7
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
8
8
|
import { resizerHoverZoneClassName, resizerItemClassName } from '@atlaskit/editor-common/styles/resizer';
|
|
9
9
|
import { akEditorDefaultLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
12
|
import { setTableAlignmentWithTableContentWithPosWithAnalytics } from '../pm-plugins/commands/commands-with-analytics';
|
|
13
13
|
import { getResizerMinWidth } from '../pm-plugins/table-resizing/utils/colgroup';
|
|
14
14
|
import { TABLE_MAX_WIDTH, TABLE_FULL_WIDTH, TABLE_OFFSET_IN_COMMENT_EDITOR, RESIZE_HANDLE_SPACING } from '../pm-plugins/table-resizing/utils/consts';
|
|
@@ -18,8 +18,8 @@ import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
|
18
18
|
import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
20
20
|
import { insm } from '@atlaskit/insm';
|
|
21
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
21
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
22
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
23
|
import { setTableAlignmentWithTableContentWithPosWithAnalytics } from '../pm-plugins/commands/commands-with-analytics';
|
|
24
24
|
import { updateWidthToWidest } from '../pm-plugins/commands/misc';
|
|
25
25
|
import { META_KEYS } from '../pm-plugins/table-analytics';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
|
|
1
3
|
import { AnalyticPluginTypes } from './actions';
|
|
2
4
|
import { createCommand, getPluginState } from './plugin-factory';
|
|
3
5
|
import { pluginKey } from './plugin-key';
|
|
4
6
|
// eslint-disable-next-line import/order
|
|
5
7
|
import { getMovedPayload } from './utils/moved-event';
|
|
6
|
-
// eslint-disable-next-line import/order
|
|
7
|
-
|
|
8
8
|
export var updateRowOrColumnMoved = function updateRowOrColumnMoved(nextState, nextAction) {
|
|
9
9
|
return createCommand(function (state) {
|
|
10
10
|
var _getPluginState = getPluginState(state),
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
|
|
1
3
|
// #region Imports
|
|
2
4
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
3
5
|
import { findTable, getCellsInColumn, getCellsInRow } from '@atlaskit/editor-tables/utils';
|
|
@@ -7,8 +9,6 @@ import { createCellHoverDecoration, createColumnLineResize, createControlsHoverD
|
|
|
7
9
|
import { getMergedCellsPositions } from '../utils/table';
|
|
8
10
|
// eslint-disable-next-line import/order
|
|
9
11
|
import { updatePluginStateDecorations } from '../utils/update-plugin-state-decorations';
|
|
10
|
-
// eslint-disable-next-line import/order
|
|
11
|
-
|
|
12
12
|
var makeArray = function makeArray(n) {
|
|
13
13
|
return Array.from(Array(n).keys());
|
|
14
14
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
|
|
1
3
|
import { removeConnectedNodes } from '@atlaskit/editor-common/utils';
|
|
2
4
|
// eslint-disable-next-line import/order
|
|
3
5
|
import { createCommand } from '../plugin-factory';
|
|
4
|
-
// eslint-disable-next-line import/order
|
|
5
|
-
|
|
6
6
|
export var removeDescendantNodes = function removeDescendantNodes(sourceNode) {
|
|
7
7
|
return createCommand({
|
|
8
8
|
type: 'UPDATE_STATE',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
|
|
1
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
2
4
|
import { cloneColumn, cloneRow, moveColumn, moveRow } from '@atlaskit/editor-tables/utils';
|
|
3
5
|
import { TableDecorations } from '../../types';
|
|
@@ -8,8 +10,6 @@ import { createCommand, getPluginState } from './plugin-factory';
|
|
|
8
10
|
import { pluginKey } from './plugin-key';
|
|
9
11
|
// eslint-disable-next-line import/order
|
|
10
12
|
|
|
11
|
-
// eslint-disable-next-line import/order
|
|
12
|
-
|
|
13
13
|
// TODO: ED-26961 - This command is a placeholder example. Please replace this if required.
|
|
14
14
|
var getDecorations = function getDecorations(state) {
|
|
15
15
|
var _pluginKey$getState;
|
|
@@ -5,8 +5,8 @@ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
|
5
5
|
import { getCellsInRow, getSelectedCellInfo } from '@atlaskit/editor-tables/utils';
|
|
6
6
|
import { insm } from '@atlaskit/insm';
|
|
7
7
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
8
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
9
8
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
9
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
import { closeActiveTableMenu } from '../commands/active-table-menu';
|
|
12
12
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
@@ -20,9 +20,9 @@ import { clearDropTargetWithAnalytics, cloneSourceWithAnalytics, moveSourceWithA
|
|
|
20
20
|
import { DropTargetType } from './consts';
|
|
21
21
|
import { createPluginState, getPluginState } from './plugin-factory';
|
|
22
22
|
import { pluginKey } from './plugin-key';
|
|
23
|
-
import { getDraggableDataFromEvent } from './utils/monitor';
|
|
24
23
|
// eslint-disable-next-line import/order
|
|
25
24
|
|
|
25
|
+
import { getDraggableDataFromEvent } from './utils/monitor';
|
|
26
26
|
var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor, api) {
|
|
27
27
|
var editorPageScrollContainer = document.querySelector('.fabric-editor-popup-scroll-parent');
|
|
28
28
|
var rowAutoScrollers = editorPageScrollContainer ? [monitorForElements({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
2
2
|
import { unsafeOverflowAutoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element';
|
|
3
3
|
// eslint-disable-next-line import/order
|
|
4
|
-
import { dropTargetExtendedWidth } from '../../../ui/consts';
|
|
5
|
-
// eslint-disable-next-line import/order
|
|
6
4
|
|
|
5
|
+
// eslint-disable-next-line import/order
|
|
6
|
+
import { dropTargetExtendedWidth } from '../../../ui/consts';
|
|
7
7
|
export var autoScrollerFactory = function autoScrollerFactory(_ref) {
|
|
8
8
|
var tableWrapper = _ref.tableWrapper,
|
|
9
9
|
getNode = _ref.getNode;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
5
|
-
import { pluginKey } from './plugin-key';
|
|
6
|
-
// eslint-disable-next-line import/order
|
|
7
|
-
import reducer from './reducer';
|
|
8
4
|
// eslint-disable-next-line import/order
|
|
9
5
|
|
|
10
6
|
// eslint-disable-next-line import/order
|
|
11
7
|
|
|
8
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
9
|
+
import { pluginKey } from './plugin-key';
|
|
10
|
+
// eslint-disable-next-line import/order
|
|
11
|
+
import reducer from './reducer';
|
|
12
12
|
function mapping(tr, pluginState) {
|
|
13
13
|
if (pluginState && pluginState.resizeHandlePos !== null) {
|
|
14
14
|
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
@@ -2,8 +2,8 @@ import { getParentNodeWidth, getTableContainerWidth, layoutToWidth } from '@atla
|
|
|
2
2
|
import { calcTableWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorTableNumberColumnWidth, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
import { hasTableBeenResized, hasTableColumnBeenResized } from './colgroup';
|
|
8
8
|
import { MAX_SCALING_PERCENT, MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION, TABLE_MAX_WIDTH, TABLE_FULL_WIDTH } from './consts';
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { isVerticalPosition } from '@atlaskit/editor-common/guideline';
|
|
3
3
|
import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorMaxWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
6
|
var numberOfLanesInDefaultLayoutWidth = 12;
|
|
7
7
|
var calculateSubSnappingWidths = function calculateSubSnappingWidths(totalLanes, totalWidth) {
|
|
8
8
|
return new Array(Math.round(totalLanes / 2) - 1).fill(totalWidth / totalLanes).map(function (v, i) {
|
package/dist/esm/tablePlugin.js
CHANGED
|
@@ -16,9 +16,9 @@ import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/ut
|
|
|
16
16
|
import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
|
|
17
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
21
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
22
22
|
import { tableNodeSpecWithFixedToDOM } from './nodeviews/toDOM';
|
|
23
23
|
import { createPlugin as createActiveCellHighlightPlugin } from './pm-plugins/active-cell-highlight/plugin';
|
|
24
24
|
import { createPlugin as createTableAnalyticsPlugin } from './pm-plugins/analytics/plugin';
|
|
@@ -5,8 +5,8 @@ import { getDomRefFromSelection } from '@atlaskit/editor-common/get-dom-ref-from
|
|
|
5
5
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { ResizerBreakoutModeLabel } from '@atlaskit/editor-common/resizer';
|
|
7
7
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
9
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
10
|
import FloatingContextualButton from './FloatingContextualButton';
|
|
11
11
|
import FloatingContextualMenu from './FloatingContextualMenu';
|
|
12
12
|
import FloatingDragMenu from './FloatingDragMenu';
|
|
@@ -3,8 +3,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/no-html-button */
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
-
import classnames from 'classnames';
|
|
7
6
|
import ReactDOM from 'react-dom';
|
|
7
|
+
import classnames from 'classnames';
|
|
8
8
|
import { injectIntl } from 'react-intl';
|
|
9
9
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
10
10
|
import { tableMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import rafSchedule from 'raf-schd';
|
|
3
2
|
import { createPortal } from 'react-dom';
|
|
3
|
+
import rafSchedule from 'raf-schd';
|
|
4
4
|
import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { TableCssClassName as ClassName } from '../../types';
|
|
6
6
|
import { insertColumnButtonOffset } from '../common-styles';
|
|
@@ -21,7 +21,6 @@ import { toggleActiveTableMenu, toggleContextualMenu } from '../../pm-plugins/co
|
|
|
21
21
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
22
22
|
import { isNativeStickySupported } from '../../pm-plugins/utils/sticky-header';
|
|
23
23
|
import { TableCssClassName as ClassName } from '../../types';
|
|
24
|
-
|
|
25
24
|
// Ignored via go/ees005
|
|
26
25
|
// eslint-disable-next-line import/no-named-as-default
|
|
27
26
|
import FixedButton from './FixedButton';
|
|
@@ -45,8 +45,8 @@ import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
|
|
|
45
45
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
46
46
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
47
47
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
48
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
49
48
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
49
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
50
50
|
import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, setFocusToCellMenu, toggleContextualMenu } from '../../pm-plugins/commands';
|
|
51
51
|
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
|
|
52
52
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
@@ -6,6 +6,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
6
6
|
* @jsx jsx
|
|
7
7
|
*/
|
|
8
8
|
/** @jsxFrag */
|
|
9
|
+
|
|
9
10
|
import React, { useEffect, useState } from 'react';
|
|
10
11
|
|
|
11
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
4
|
+
|
|
4
5
|
import React, { useCallback, useState } from 'react';
|
|
5
6
|
import { DropList, Popup } from '@atlaskit/editor-common/ui';
|
|
6
7
|
import { ArrowKeyNavigationProvider, ArrowKeyNavigationType, DropdownMenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 */
|
|
4
|
+
|
|
4
5
|
import { css } from '@emotion/react';
|
|
5
6
|
import { tableBackgroundBorderColor } from '@atlaskit/adf-schema/tableNodes';
|
|
6
7
|
import { TableCssClassName as ClassName } from '../../types';
|