@atlaskit/editor-plugin-table 16.0.2 → 16.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 +21 -0
- package/dist/cjs/pm-plugins/table-anchor-names/plugin.js +8 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/styles.js +5 -9
- package/dist/cjs/ui/toolbar.js +1 -2
- package/dist/es2019/pm-plugins/table-anchor-names/plugin.js +8 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/styles.js +2 -6
- package/dist/es2019/ui/toolbar.js +1 -2
- package/dist/esm/pm-plugins/table-anchor-names/plugin.js +8 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/styles.js +3 -8
- package/dist/esm/ui/toolbar.js +1 -2
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`00e69e0b7c839`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/00e69e0b7c839) -
|
|
8
|
+
Clean up and removal of the `platform-visual-refresh-icons` feature flag.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`a3bc4ac27ae8e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a3bc4ac27ae8e) -
|
|
13
|
+
[ux] EDITOR-4134 Fix firefox nightly for anchor fallback solution
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 16.0.3
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`b429c01ce6af9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b429c01ce6af9) -
|
|
21
|
+
icon migration entry point update
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 16.0.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -10,8 +10,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
12
12
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
13
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
15
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid
|
|
16
18
|
var ObjHash = /*#__PURE__*/function () {
|
|
17
19
|
function ObjHash() {
|
|
@@ -45,7 +47,12 @@ var createTableAnchorDecorations = function createTableAnchorDecorations(state)
|
|
|
45
47
|
// only apply to header cells and the first row of a table, for performance reasons
|
|
46
48
|
if (isTableRow && index === 0 || isTableHeader) {
|
|
47
49
|
var anchorName = getNodeAnchor(node);
|
|
48
|
-
|
|
50
|
+
var shouldAddAnchorNameInDecoration = !(0, _styles.isCSSAttrAnchorSupported)() && (0, _styles.isCSSAnchorSupported)() && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_8');
|
|
51
|
+
var attributes = {
|
|
52
|
+
'data-node-anchor': anchorName,
|
|
53
|
+
'style': "anchor-name: ".concat(anchorName, ";")
|
|
54
|
+
};
|
|
55
|
+
decs.push(_view.Decoration.node(pos, pos + node.nodeSize, shouldAddAnchorNameInDecoration ? attributes : {
|
|
49
56
|
'data-node-anchor': anchorName
|
|
50
57
|
}));
|
|
51
58
|
}
|
|
@@ -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/core/
|
|
20
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
21
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
23
|
var _commands = require("../../pm-plugins/commands");
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.tableFloatingCellButtonStyles = exports.tableFloatingCellButtonSelectedStyles = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
9
|
var _consts = require("../consts");
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
+
|
|
15
12
|
var tableFloatingCellButtonStyles = exports.tableFloatingCellButtonStyles = function tableFloatingCellButtonStyles() {
|
|
16
13
|
return (0, _react.css)({
|
|
17
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
|
-
'> div':
|
|
15
|
+
'> div': {
|
|
19
16
|
// Sits behind button to provide surface-color background
|
|
20
17
|
background: "var(--ds-surface, ".concat(_colors.N20, ")"),
|
|
21
18
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
22
19
|
display: 'flex',
|
|
23
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
21
|
height: "".concat(_consts.contextualMenuTriggerSize + 2, "px"),
|
|
22
|
+
width: "var(--ds-space-250, 20px)",
|
|
25
23
|
flexDirection: 'column'
|
|
26
|
-
},
|
|
27
|
-
width: "var(--ds-space-250, 20px)"
|
|
28
|
-
}),
|
|
24
|
+
},
|
|
29
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
30
26
|
'&& button': {
|
|
31
27
|
background: "var(--ds-background-neutral, none)",
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -113,8 +113,7 @@ var getToolbarMenuConfig = exports.getToolbarMenuConfig = function getToolbarMen
|
|
|
113
113
|
id: 'editor.table.tableOptions',
|
|
114
114
|
type: 'dropdown',
|
|
115
115
|
testId: 'table_options',
|
|
116
|
-
|
|
117
|
-
iconBefore: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? _customize.default : undefined,
|
|
116
|
+
iconBefore: _customize.default,
|
|
118
117
|
title: formatMessage(_messages.tableMessages.tableOptions),
|
|
119
118
|
hidden: options.every(function (option) {
|
|
120
119
|
return option.hidden;
|
|
@@ -2,8 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid
|
|
3
3
|
import uuid from 'uuid';
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
|
+
import { isCSSAnchorSupported, isCSSAttrAnchorSupported } from '@atlaskit/editor-common/styles';
|
|
5
6
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
7
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
class ObjHash {
|
|
8
10
|
static getForNode(node) {
|
|
9
11
|
if (this.cache.has(node)) {
|
|
@@ -30,7 +32,12 @@ const createTableAnchorDecorations = state => {
|
|
|
30
32
|
// only apply to header cells and the first row of a table, for performance reasons
|
|
31
33
|
if (isTableRow && index === 0 || isTableHeader) {
|
|
32
34
|
const anchorName = getNodeAnchor(node);
|
|
33
|
-
|
|
35
|
+
const shouldAddAnchorNameInDecoration = !isCSSAttrAnchorSupported() && isCSSAnchorSupported() && fg('platform_editor_table_sticky_header_patch_8');
|
|
36
|
+
const attributes = {
|
|
37
|
+
'data-node-anchor': anchorName,
|
|
38
|
+
'style': `anchor-name: ${anchorName};`
|
|
39
|
+
};
|
|
40
|
+
decs.push(Decoration.node(pos, pos + node.nodeSize, shouldAddAnchorNameInDecoration ? attributes : {
|
|
34
41
|
'data-node-anchor': anchorName
|
|
35
42
|
}));
|
|
36
43
|
}
|
|
@@ -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/core/
|
|
18
|
+
import ExpandIcon from '@atlaskit/icon/core/chevron-down';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
21
|
import { toggleContextualMenu } from '../../pm-plugins/commands';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { N0, N20, N30A, N700 } from '@atlaskit/theme/colors';
|
|
5
4
|
import { contextualMenuTriggerSize } from '../consts';
|
|
6
5
|
export const tableFloatingCellButtonStyles = () => css({
|
|
@@ -12,11 +11,8 @@ export const tableFloatingCellButtonStyles = () => css({
|
|
|
12
11
|
display: 'flex',
|
|
13
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
13
|
height: `${contextualMenuTriggerSize + 2}px`,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...(fg('platform-visual-refresh-icons') && {
|
|
18
|
-
width: "var(--ds-space-250, 20px)"
|
|
19
|
-
})
|
|
14
|
+
width: "var(--ds-space-250, 20px)",
|
|
15
|
+
flexDirection: 'column'
|
|
20
16
|
},
|
|
21
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
22
18
|
'&& button': {
|
|
@@ -101,8 +101,7 @@ export const getToolbarMenuConfig = (config, state, {
|
|
|
101
101
|
id: 'editor.table.tableOptions',
|
|
102
102
|
type: 'dropdown',
|
|
103
103
|
testId: 'table_options',
|
|
104
|
-
|
|
105
|
-
iconBefore: fg('platform-visual-refresh-icons') ? CustomizeIcon : undefined,
|
|
104
|
+
iconBefore: CustomizeIcon,
|
|
106
105
|
title: formatMessage(messages.tableOptions),
|
|
107
106
|
hidden: options.every(option => option.hidden),
|
|
108
107
|
options,
|
|
@@ -4,8 +4,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid
|
|
5
5
|
import uuid from 'uuid';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
+
import { isCSSAnchorSupported, isCSSAttrAnchorSupported } from '@atlaskit/editor-common/styles';
|
|
7
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
11
|
var ObjHash = /*#__PURE__*/function () {
|
|
10
12
|
function ObjHash() {
|
|
11
13
|
_classCallCheck(this, ObjHash);
|
|
@@ -38,7 +40,12 @@ var createTableAnchorDecorations = function createTableAnchorDecorations(state)
|
|
|
38
40
|
// only apply to header cells and the first row of a table, for performance reasons
|
|
39
41
|
if (isTableRow && index === 0 || isTableHeader) {
|
|
40
42
|
var anchorName = getNodeAnchor(node);
|
|
41
|
-
|
|
43
|
+
var shouldAddAnchorNameInDecoration = !isCSSAttrAnchorSupported() && isCSSAnchorSupported() && fg('platform_editor_table_sticky_header_patch_8');
|
|
44
|
+
var attributes = {
|
|
45
|
+
'data-node-anchor': anchorName,
|
|
46
|
+
'style': "anchor-name: ".concat(anchorName, ";")
|
|
47
|
+
};
|
|
48
|
+
decs.push(Decoration.node(pos, pos + node.nodeSize, shouldAddAnchorNameInDecoration ? attributes : {
|
|
42
49
|
'data-node-anchor': anchorName
|
|
43
50
|
}));
|
|
44
51
|
}
|
|
@@ -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/core/
|
|
18
|
+
import ExpandIcon from '@atlaskit/icon/core/chevron-down';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
21
|
import { toggleContextualMenu } from '../../pm-plugins/commands';
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
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
|
-
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
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
2
|
import { css } from '@emotion/react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
3
|
import { N0, N20, N30A, N700 } from '@atlaskit/theme/colors';
|
|
8
4
|
import { contextualMenuTriggerSize } from '../consts';
|
|
9
5
|
export var tableFloatingCellButtonStyles = function tableFloatingCellButtonStyles() {
|
|
10
6
|
return css({
|
|
11
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
|
-
'> div':
|
|
8
|
+
'> div': {
|
|
13
9
|
// Sits behind button to provide surface-color background
|
|
14
10
|
background: "var(--ds-surface, ".concat(N20, ")"),
|
|
15
11
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
16
12
|
display: 'flex',
|
|
17
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
14
|
height: "".concat(contextualMenuTriggerSize + 2, "px"),
|
|
15
|
+
width: "var(--ds-space-250, 20px)",
|
|
19
16
|
flexDirection: 'column'
|
|
20
|
-
},
|
|
21
|
-
width: "var(--ds-space-250, 20px)"
|
|
22
|
-
}),
|
|
17
|
+
},
|
|
23
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
24
19
|
'&& button': {
|
|
25
20
|
background: "var(--ds-background-neutral, none)",
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -106,8 +106,7 @@ export var getToolbarMenuConfig = function getToolbarMenuConfig(config, state, _
|
|
|
106
106
|
id: 'editor.table.tableOptions',
|
|
107
107
|
type: 'dropdown',
|
|
108
108
|
testId: 'table_options',
|
|
109
|
-
|
|
110
|
-
iconBefore: fg('platform-visual-refresh-icons') ? CustomizeIcon : undefined,
|
|
109
|
+
iconBefore: CustomizeIcon,
|
|
111
110
|
title: formatMessage(messages.tableOptions),
|
|
112
111
|
hidden: options.every(function (option) {
|
|
113
112
|
return option.hidden;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^7.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^7.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "10.0.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "10.0.1",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^7.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^12.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^4.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"uuid": "^3.1.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@atlaskit/editor-common": "^111.
|
|
73
|
+
"@atlaskit/editor-common": "^111.1.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-dom": "^18.2.0",
|
|
76
76
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -172,6 +172,9 @@
|
|
|
172
172
|
},
|
|
173
173
|
"platform_editor_table_sticky_header_patch_7": {
|
|
174
174
|
"type": "boolean"
|
|
175
|
+
},
|
|
176
|
+
"platform_editor_table_sticky_header_patch_8": {
|
|
177
|
+
"type": "boolean"
|
|
175
178
|
}
|
|
176
179
|
}
|
|
177
180
|
}
|