@atlaskit/editor-plugin-table 10.11.10 → 10.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/afm-cc/tsconfig.json +1 -1
- package/dist/cjs/pm-plugins/table-resizing/plugin.js +2 -1
- package/dist/cjs/tablePlugin.js +2 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +3 -2
- package/dist/es2019/pm-plugins/table-resizing/plugin.js +2 -1
- package/dist/es2019/tablePlugin.js +2 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +3 -2
- package/dist/esm/pm-plugins/table-resizing/plugin.js +2 -1
- package/dist/esm/tablePlugin.js +2 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +3 -2
- package/package.json +4 -4
- package/src/pm-plugins/table-resizing/plugin.ts +10 -4
- package/src/tablePlugin.tsx +2 -1
- package/src/ui/FloatingContextualButton/index.tsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 10.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.12.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#167123](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/167123)
|
|
14
|
+
[`8baa50249f460`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8baa50249f460) -
|
|
15
|
+
fix: stable class name for EditorView.dom
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 10.11.10
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -8,6 +8,7 @@ exports.createPlugin = createPlugin;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
12
|
var _types = require("../../types");
|
|
12
13
|
var _pluginFactory = require("../plugin-factory");
|
|
13
14
|
var _commands = require("./commands");
|
|
@@ -30,7 +31,7 @@ function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorFeatureF
|
|
|
30
31
|
attributes: function attributes(state) {
|
|
31
32
|
var pluginState = (0, _pluginFactory2.getPluginState)(state);
|
|
32
33
|
return {
|
|
33
|
-
class: (0, _classnames2.default)(_types.TableCssClassName.RESIZING_PLUGIN, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), _types.TableCssClassName.IS_RESIZING, !!pluginState.dragging))
|
|
34
|
+
class: (0, _classnames2.default)((0, _expValEquals.expValEquals)('platform_editor_stable_editorview_classname', 'isEnabled', true) ? '' : _types.TableCssClassName.RESIZING_PLUGIN, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), _types.TableCssClassName.IS_RESIZING, !!pluginState.dragging))
|
|
34
35
|
};
|
|
35
36
|
},
|
|
36
37
|
handleDOMEvents: {
|
package/dist/cjs/tablePlugin.js
CHANGED
|
@@ -27,6 +27,7 @@ var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
|
27
27
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
28
28
|
var _pmPlugins = require("@atlaskit/editor-tables/pm-plugins");
|
|
29
29
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
30
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
31
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
31
32
|
var _toDOM = require("./nodeviews/toDOM");
|
|
32
33
|
var _plugin = require("./pm-plugins/analytics/plugin");
|
|
@@ -466,7 +467,7 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
466
467
|
popupsBoundariesElement = _ref18.popupsBoundariesElement,
|
|
467
468
|
popupsScrollableElement = _ref18.popupsScrollableElement,
|
|
468
469
|
dispatchAnalyticsEvent = _ref18.dispatchAnalyticsEvent;
|
|
469
|
-
if ((0,
|
|
470
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_usesharedpluginstateselector', 'isEnabled', true)) {
|
|
470
471
|
return /*#__PURE__*/_react.default.createElement(_ContentComponent.ContentComponent, {
|
|
471
472
|
api: api,
|
|
472
473
|
editorView: editorView,
|
|
@@ -17,7 +17,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
17
17
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
18
18
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
19
19
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
20
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
20
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down"));
|
|
21
21
|
var _commands = require("../../pm-plugins/commands");
|
|
22
22
|
var _types = require("../../types");
|
|
23
23
|
var _FixedButton = _interopRequireDefault(require("./FixedButton"));
|
|
@@ -87,7 +87,8 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
|
|
|
87
87
|
onClick: handleClick,
|
|
88
88
|
iconBefore: (0, _react2.jsx)(_chevronDown.default, {
|
|
89
89
|
label: "",
|
|
90
|
-
color: "currentColor"
|
|
90
|
+
color: "currentColor",
|
|
91
|
+
size: "small"
|
|
91
92
|
}),
|
|
92
93
|
"aria-label": labelCellOptions,
|
|
93
94
|
"aria-expanded": isContextualMenuOpen
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import classnames from 'classnames';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
import { TableCssClassName as ClassName } from '../../types';
|
|
4
5
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
5
6
|
import { setResizeHandlePos } from './commands';
|
|
@@ -22,7 +23,7 @@ export function createPlugin(dispatch, {
|
|
|
22
23
|
attributes(state) {
|
|
23
24
|
const pluginState = getPluginState(state);
|
|
24
25
|
return {
|
|
25
|
-
class: classnames(ClassName.RESIZING_PLUGIN, {
|
|
26
|
+
class: classnames(expValEquals('platform_editor_stable_editorview_classname', 'isEnabled', true) ? '' : ClassName.RESIZING_PLUGIN, {
|
|
26
27
|
[ClassName.RESIZE_CURSOR]: pluginState.resizeHandlePos !== null,
|
|
27
28
|
[ClassName.IS_RESIZING]: !!pluginState.dragging
|
|
28
29
|
})
|
|
@@ -18,6 +18,7 @@ import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/ut
|
|
|
18
18
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
|
|
20
20
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
22
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
22
23
|
import { tableNodeSpecWithFixedToDOM } from './nodeviews/toDOM';
|
|
23
24
|
import { createPlugin as createTableAnalyticsPlugin } from './pm-plugins/analytics/plugin';
|
|
@@ -456,7 +457,7 @@ const tablePlugin = ({
|
|
|
456
457
|
dispatchAnalyticsEvent
|
|
457
458
|
}) {
|
|
458
459
|
var _api$featureFlags;
|
|
459
|
-
if (
|
|
460
|
+
if (expValEquals('platform_editor_usesharedpluginstateselector', 'isEnabled', true)) {
|
|
460
461
|
return /*#__PURE__*/React.createElement(ContentComponent, {
|
|
461
462
|
api: api,
|
|
462
463
|
editorView: editorView,
|
|
@@ -15,7 +15,7 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
15
15
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
16
16
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
17
17
|
import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
|
|
18
|
-
import ExpandIcon from '@atlaskit/icon/
|
|
18
|
+
import ExpandIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
19
19
|
import { toggleContextualMenu } from '../../pm-plugins/commands';
|
|
20
20
|
import { TableCssClassName as ClassName } from '../../types';
|
|
21
21
|
|
|
@@ -85,7 +85,8 @@ const FloatingContextualButtonInner = /*#__PURE__*/React.memo(props => {
|
|
|
85
85
|
onClick: handleClick,
|
|
86
86
|
iconBefore: jsx(ExpandIcon, {
|
|
87
87
|
label: "",
|
|
88
|
-
color: "currentColor"
|
|
88
|
+
color: "currentColor",
|
|
89
|
+
size: "small"
|
|
89
90
|
}),
|
|
90
91
|
"aria-label": labelCellOptions,
|
|
91
92
|
"aria-expanded": isContextualMenuOpen
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { TableCssClassName as ClassName } from '../../types';
|
|
5
6
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
6
7
|
import { setResizeHandlePos } from './commands';
|
|
@@ -23,7 +24,7 @@ export function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorF
|
|
|
23
24
|
attributes: function attributes(state) {
|
|
24
25
|
var pluginState = getPluginState(state);
|
|
25
26
|
return {
|
|
26
|
-
class: classnames(ClassName.RESIZING_PLUGIN, _defineProperty(_defineProperty({}, ClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), ClassName.IS_RESIZING, !!pluginState.dragging))
|
|
27
|
+
class: classnames(expValEquals('platform_editor_stable_editorview_classname', 'isEnabled', true) ? '' : ClassName.RESIZING_PLUGIN, _defineProperty(_defineProperty({}, ClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), ClassName.IS_RESIZING, !!pluginState.dragging))
|
|
27
28
|
};
|
|
28
29
|
},
|
|
29
30
|
handleDOMEvents: {
|
package/dist/esm/tablePlugin.js
CHANGED
|
@@ -21,6 +21,7 @@ import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/ut
|
|
|
21
21
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
22
22
|
import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
|
|
23
23
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
24
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
24
25
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
25
26
|
import { tableNodeSpecWithFixedToDOM } from './nodeviews/toDOM';
|
|
26
27
|
import { createPlugin as createTableAnalyticsPlugin } from './pm-plugins/analytics/plugin';
|
|
@@ -458,7 +459,7 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
458
459
|
popupsBoundariesElement = _ref18.popupsBoundariesElement,
|
|
459
460
|
popupsScrollableElement = _ref18.popupsScrollableElement,
|
|
460
461
|
dispatchAnalyticsEvent = _ref18.dispatchAnalyticsEvent;
|
|
461
|
-
if (
|
|
462
|
+
if (expValEquals('platform_editor_usesharedpluginstateselector', 'isEnabled', true)) {
|
|
462
463
|
return /*#__PURE__*/React.createElement(ContentComponent, {
|
|
463
464
|
api: api,
|
|
464
465
|
editorView: editorView,
|
|
@@ -15,7 +15,7 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
15
15
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
16
16
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
17
17
|
import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
|
|
18
|
-
import ExpandIcon from '@atlaskit/icon/
|
|
18
|
+
import ExpandIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
19
19
|
import { toggleContextualMenu } from '../../pm-plugins/commands';
|
|
20
20
|
import { TableCssClassName as ClassName } from '../../types';
|
|
21
21
|
|
|
@@ -77,7 +77,8 @@ var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
|
|
|
77
77
|
onClick: handleClick,
|
|
78
78
|
iconBefore: jsx(ExpandIcon, {
|
|
79
79
|
label: "",
|
|
80
|
-
color: "currentColor"
|
|
80
|
+
color: "currentColor",
|
|
81
|
+
size: "small"
|
|
81
82
|
}),
|
|
82
83
|
"aria-label": labelCellOptions,
|
|
83
84
|
"aria-expanded": isContextualMenuOpen
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.12.1",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
33
33
|
"@atlaskit/button": "^23.2.0",
|
|
34
34
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
35
|
-
"@atlaskit/editor-common": "^106.
|
|
35
|
+
"@atlaskit/editor-common": "^106.6.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-content-insertion": "^2.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-viewmode": "^4.0.0",
|
|
42
|
-
"@atlaskit/editor-plugin-extension": "5.5.
|
|
42
|
+
"@atlaskit/editor-plugin-extension": "5.5.6",
|
|
43
43
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-interaction": "^2.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-selection": "^2.2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
56
56
|
"@atlaskit/primitives": "^14.8.0",
|
|
57
57
|
"@atlaskit/theme": "^18.0.0",
|
|
58
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
58
|
+
"@atlaskit/tmp-editor-statsig": "^7.0.0",
|
|
59
59
|
"@atlaskit/toggle": "^15.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^5.1.0",
|
|
61
61
|
"@atlaskit/tooltip": "^20.3.0",
|
|
@@ -5,6 +5,7 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
5
5
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
|
|
9
10
|
import { TableCssClassName as ClassName } from '../../types';
|
|
10
11
|
import type { ColumnResizingPluginState, PluginInjectionAPI } from '../../types';
|
|
@@ -41,10 +42,15 @@ export function createPlugin(
|
|
|
41
42
|
const pluginState = getPluginState(state);
|
|
42
43
|
|
|
43
44
|
return {
|
|
44
|
-
class: classnames(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
class: classnames(
|
|
46
|
+
expValEquals('platform_editor_stable_editorview_classname', 'isEnabled', true)
|
|
47
|
+
? ''
|
|
48
|
+
: ClassName.RESIZING_PLUGIN,
|
|
49
|
+
{
|
|
50
|
+
[ClassName.RESIZE_CURSOR]: pluginState.resizeHandlePos !== null,
|
|
51
|
+
[ClassName.IS_RESIZING]: !!pluginState.dragging,
|
|
52
|
+
},
|
|
53
|
+
),
|
|
48
54
|
};
|
|
49
55
|
},
|
|
50
56
|
|
package/src/tablePlugin.tsx
CHANGED
|
@@ -47,6 +47,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
47
47
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
48
48
|
import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
|
|
49
49
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
50
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
50
51
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
51
52
|
|
|
52
53
|
import { tableNodeSpecWithFixedToDOM } from './nodeviews/toDOM';
|
|
@@ -580,7 +581,7 @@ const tablePlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
580
581
|
popupsScrollableElement,
|
|
581
582
|
dispatchAnalyticsEvent,
|
|
582
583
|
}) {
|
|
583
|
-
if (
|
|
584
|
+
if (expValEquals('platform_editor_usesharedpluginstateselector', 'isEnabled', true)) {
|
|
584
585
|
return (
|
|
585
586
|
<ContentComponent
|
|
586
587
|
api={api}
|
|
@@ -20,7 +20,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
20
20
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
21
21
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
22
22
|
import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
|
|
23
|
-
import ExpandIcon from '@atlaskit/icon/
|
|
23
|
+
import ExpandIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
24
24
|
|
|
25
25
|
import { toggleContextualMenu } from '../../pm-plugins/commands';
|
|
26
26
|
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
@@ -106,7 +106,7 @@ const FloatingContextualButtonInner = React.memo((props: Props & WrappedComponen
|
|
|
106
106
|
title={labelCellOptions}
|
|
107
107
|
keymap={focusToContextMenuTrigger}
|
|
108
108
|
onClick={handleClick}
|
|
109
|
-
iconBefore={<ExpandIcon label="" color="currentColor" />}
|
|
109
|
+
iconBefore={<ExpandIcon label="" color="currentColor" size="small" />}
|
|
110
110
|
aria-label={labelCellOptions}
|
|
111
111
|
aria-expanded={isContextualMenuOpen}
|
|
112
112
|
/>
|