@atlaskit/editor-plugin-table 7.17.0 → 7.17.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 +9 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/cjs/toolbar.js +3 -0
- package/dist/cjs/ui/DragHandle/index.js +4 -2
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +5 -1
- package/dist/cjs/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/cjs/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/cjs/ui/FloatingDragMenu/index.js +5 -2
- package/dist/cjs/ui/FloatingDragMenu/styles.js +12 -1
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/cjs/ui/common-styles.js +3 -1
- package/dist/cjs/ui/consts.js +4 -1
- package/dist/cjs/ui/ui-styles.js +35 -3
- package/dist/cjs/utils/drag-menu.js +32 -27
- package/dist/es2019/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/es2019/toolbar.js +3 -0
- package/dist/es2019/ui/DragHandle/index.js +6 -2
- package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +5 -1
- package/dist/es2019/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +38 -11
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/es2019/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +34 -13
- package/dist/es2019/ui/FloatingDragMenu/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/styles.js +11 -3
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +6 -2
- package/dist/es2019/ui/common-styles.js +3 -1
- package/dist/es2019/ui/consts.js +3 -0
- package/dist/es2019/ui/ui-styles.js +36 -3
- package/dist/es2019/utils/drag-menu.js +23 -19
- package/dist/esm/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/esm/toolbar.js +3 -0
- package/dist/esm/ui/DragHandle/index.js +4 -2
- package/dist/esm/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +5 -1
- package/dist/esm/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/esm/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/esm/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/esm/ui/FloatingDragMenu/index.js +5 -2
- package/dist/esm/ui/FloatingDragMenu/styles.js +13 -2
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/esm/ui/common-styles.js +3 -1
- package/dist/esm/ui/consts.js +3 -0
- package/dist/esm/ui/ui-styles.js +35 -3
- package/dist/esm/utils/drag-menu.js +32 -27
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types/ui/consts.d.ts +3 -0
- package/dist/types/utils/drag-menu.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types-ts4.5/ui/consts.d.ts +3 -0
- package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
- package/package.json +2 -2
- package/src/nodeviews/ExternalDropTargets.tsx +2 -1
- package/src/toolbar.tsx +3 -0
- package/src/ui/DragHandle/index.tsx +4 -2
- package/src/ui/FloatingContextualButton/FixedButton.tsx +1 -1
- package/src/ui/FloatingContextualButton/index.tsx +2 -0
- package/src/ui/FloatingContextualButton/styles.ts +10 -0
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +22 -3
- package/src/ui/FloatingContextualMenu/index.tsx +1 -0
- package/src/ui/FloatingContextualMenu/styles.ts +2 -0
- package/src/ui/FloatingDeleteButton/index.tsx +2 -1
- package/src/ui/FloatingDragMenu/DragMenu.tsx +39 -16
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +1 -1
- package/src/ui/FloatingDragMenu/index.tsx +6 -2
- package/src/ui/FloatingDragMenu/styles.ts +20 -3
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +1 -0
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +1 -1
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +4 -2
- package/src/ui/common-styles.ts +2 -1
- package/src/ui/consts.ts +4 -0
- package/src/ui/ui-styles.ts +25 -0
- package/src/utils/drag-menu.ts +28 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#109812](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109812)
|
|
8
|
+
[`b066a2c5e63b2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b066a2c5e63b2) -
|
|
9
|
+
ED-23599: Move sort column to top of drag menu when FF is on
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 7.17.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -54,10 +54,11 @@ var ExternalDropTargets = exports.ExternalDropTargets = function ExternalDropTar
|
|
|
54
54
|
overflow: 'hidden',
|
|
55
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
56
56
|
position: 'absolute',
|
|
57
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
57
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
58
58
|
top: "-".concat(_consts.dropTargetExtendedWidth - _styles.tableMarginTop, "px"),
|
|
59
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
60
60
|
pointerEvents: 'auto',
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
61
62
|
zIndex: "".concat(_consts.dropTargetsZIndex)
|
|
62
63
|
},
|
|
63
64
|
"data-testid": "table-floating-column-extended-drop-targets"
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -155,6 +155,7 @@ var getToolbarCellOptionsConfig = exports.getToolbarCellOptionsConfig = function
|
|
|
155
155
|
},
|
|
156
156
|
selected: false,
|
|
157
157
|
disabled: false,
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
158
159
|
elemAfter: (0, _react.jsx)("div", {
|
|
159
160
|
css: _shortcut.shortcutStyle
|
|
160
161
|
}, (0, _keymaps.tooltip)(_keymaps.addColumnAfter))
|
|
@@ -174,6 +175,7 @@ var getToolbarCellOptionsConfig = exports.getToolbarCellOptionsConfig = function
|
|
|
174
175
|
},
|
|
175
176
|
selected: false,
|
|
176
177
|
disabled: false,
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
177
179
|
elemAfter: (0, _react.jsx)("div", {
|
|
178
180
|
css: _shortcut.shortcutStyle
|
|
179
181
|
}, (0, _keymaps.tooltip)(_keymaps.addRowAfter))
|
|
@@ -306,6 +308,7 @@ var getToolbarCellOptionsConfig = exports.getToolbarCellOptionsConfig = function
|
|
|
306
308
|
},
|
|
307
309
|
selected: false,
|
|
308
310
|
disabled: false,
|
|
311
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
309
312
|
elemAfter: (0, _react.jsx)("div", {
|
|
310
313
|
css: _shortcut.shortcutStyle
|
|
311
314
|
}, (0, _keymaps.tooltip)(_keymaps.backspace))
|
|
@@ -162,10 +162,12 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
|
|
|
162
162
|
className: _types.TableCssClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE,
|
|
163
163
|
"data-testid": "table-drag-handle-clickable-zone-button",
|
|
164
164
|
style: {
|
|
165
|
-
height: isRow ?
|
|
165
|
+
height: isRow ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
166
|
+
"calc(100% - ".concat(_consts.dragTableInsertColumnButtonSize, "px)") : "var(--ds-space-200, 16px)",
|
|
166
167
|
// 16px here because it's the size of drag handle button's large side
|
|
167
168
|
width: isRow ? "var(--ds-space-200, 16px)" // 16px here because it's the size of drag handle button's large side
|
|
168
|
-
:
|
|
169
|
+
: // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
170
|
+
"calc(100% - ".concat(_consts.dragTableInsertColumnButtonSize, "px)"),
|
|
169
171
|
left: isRow ? "var(--ds-space-050, 4px)" : undefined,
|
|
170
172
|
bottom: isColumn ? "var(--ds-space-0, 0px)" : undefined,
|
|
171
173
|
alignSelf: isColumn ? 'none' : 'center',
|
|
@@ -120,7 +120,7 @@ var FixedButton = exports.FixedButton = function FixedButton(_ref2) {
|
|
|
120
120
|
position: 'fixed',
|
|
121
121
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
122
122
|
top: stickyHeader.top + stickyHeader.padding + offset * 2,
|
|
123
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
123
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
124
124
|
zIndex: _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex,
|
|
125
125
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
126
126
|
left: calcLeftPos({
|
|
@@ -53,7 +53,11 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
|
|
|
53
53
|
}
|
|
54
54
|
var labelCellOptions = formatMessage(_messages.tableMessages.cellOptions);
|
|
55
55
|
var button = (0, _react2.jsx)("div", {
|
|
56
|
-
css: [
|
|
56
|
+
css: [
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
58
|
+
(0, _styles.tableFloatingCellButtonStyles)(),
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
60
|
+
isContextualMenuOpen && (0, _styles.tableFloatingCellButtonSelectedStyles)()]
|
|
57
61
|
}, (0, _react2.jsx)(_uiMenu.ToolbarButton
|
|
58
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
59
63
|
, {
|
|
@@ -9,14 +9,17 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
9
9
|
var _consts = require("../consts");
|
|
10
10
|
var tableFloatingCellButtonStyles = exports.tableFloatingCellButtonStyles = function tableFloatingCellButtonStyles() {
|
|
11
11
|
return (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
13
|
'> div': {
|
|
13
14
|
// Sits behind button to provide surface-color background
|
|
14
15
|
background: "var(--ds-surface, ".concat(_colors.N20, ")"),
|
|
15
16
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
16
17
|
display: 'flex',
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
17
19
|
height: "".concat(_consts.contextualMenuTriggerSize + 2, "px"),
|
|
18
20
|
flexDirection: 'column'
|
|
19
21
|
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
20
23
|
'&& button': {
|
|
21
24
|
background: "var(--ds-background-neutral, none)",
|
|
22
25
|
flexDirection: 'column',
|
|
@@ -27,15 +30,19 @@ var tableFloatingCellButtonStyles = exports.tableFloatingCellButtonStyles = func
|
|
|
27
30
|
height: 'calc(100% - 4px)',
|
|
28
31
|
display: 'flex'
|
|
29
32
|
},
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
30
34
|
'&& button:hover': {
|
|
31
35
|
background: "var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")")
|
|
32
36
|
},
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
33
38
|
'&& button:active': {
|
|
34
39
|
background: "var(--ds-background-neutral-pressed, rgba(179, 212, 255, 0.6))"
|
|
35
40
|
},
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
36
42
|
'&& button > span': {
|
|
37
43
|
margin: "0px ".concat("var(--ds-space-negative-050, -4px)")
|
|
38
44
|
},
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
39
46
|
'&& span': {
|
|
40
47
|
pointerEvents: 'none'
|
|
41
48
|
}
|
|
@@ -43,12 +50,15 @@ var tableFloatingCellButtonStyles = exports.tableFloatingCellButtonStyles = func
|
|
|
43
50
|
};
|
|
44
51
|
var tableFloatingCellButtonSelectedStyles = exports.tableFloatingCellButtonSelectedStyles = function tableFloatingCellButtonSelectedStyles() {
|
|
45
52
|
return (0, _react.css)({
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
46
54
|
'&& button': {
|
|
47
55
|
background: "var(--ds-background-selected, ".concat(_colors.N700, ")")
|
|
48
56
|
},
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
49
58
|
'&& button:hover': {
|
|
50
59
|
background: "var(--ds-background-selected-hovered, ".concat(_colors.N700, ")")
|
|
51
60
|
},
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
52
62
|
'&& button:active': {
|
|
53
63
|
background: "var(--ds-background-selected-pressed, ".concat(_colors.N700, ")")
|
|
54
64
|
}
|
|
@@ -89,7 +89,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
89
89
|
value: {
|
|
90
90
|
name: 'background'
|
|
91
91
|
},
|
|
92
|
-
elemBefore: isDragAndDropEnabled ?
|
|
92
|
+
elemBefore: isDragAndDropEnabled ?
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
94
|
+
(0, _react2.jsx)("span", {
|
|
93
95
|
css: _styles2.elementBeforeIconStyles
|
|
94
96
|
}, (0, _react2.jsx)(_backgroundColor.default, {
|
|
95
97
|
label: formatMessage(_messages.tableMessages.backgroundColor),
|
|
@@ -100,6 +102,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
100
102
|
(0, _react2.jsx)("div", {
|
|
101
103
|
className: _styles.DropdownMenuSharedCssClassName.SUBMENU
|
|
102
104
|
}, (0, _react2.jsx)("div", {
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
103
106
|
css: (0, _styles2.cellColourPreviewStyles)(background)
|
|
104
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
105
108
|
,
|
|
@@ -136,7 +139,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
136
139
|
name: 'merge'
|
|
137
140
|
},
|
|
138
141
|
isDisabled: !(0, _transforms.canMergeCells)(state.tr),
|
|
139
|
-
elemBefore: isDragAndDropEnabled ?
|
|
142
|
+
elemBefore: isDragAndDropEnabled ?
|
|
143
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
144
|
+
(0, _react2.jsx)("span", {
|
|
140
145
|
css: _styles2.elementBeforeIconStyles
|
|
141
146
|
}, (0, _react2.jsx)(_icons.MergeCellsIcon, null)) : undefined
|
|
142
147
|
}, {
|
|
@@ -145,7 +150,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
145
150
|
name: 'split'
|
|
146
151
|
},
|
|
147
152
|
isDisabled: !(0, _utils2.splitCell)(state),
|
|
148
|
-
elemBefore: isDragAndDropEnabled ?
|
|
153
|
+
elemBefore: isDragAndDropEnabled ?
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
155
|
+
(0, _react2.jsx)("span", {
|
|
149
156
|
css: _styles2.elementBeforeIconStyles
|
|
150
157
|
}, (0, _react2.jsx)(_icons.SplitCellIcon, null)) : undefined
|
|
151
158
|
}];
|
|
@@ -163,10 +170,13 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
163
170
|
value: {
|
|
164
171
|
name: 'insert_column'
|
|
165
172
|
},
|
|
173
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
166
174
|
elemAfter: (0, _react2.jsx)("div", {
|
|
167
175
|
css: _shortcut.shortcutStyle
|
|
168
176
|
}, (0, _keymaps.tooltip)(_keymaps.addColumnAfter)),
|
|
169
|
-
elemBefore: isDragAndDropEnabled ?
|
|
177
|
+
elemBefore: isDragAndDropEnabled ?
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
179
|
+
(0, _react2.jsx)("span", {
|
|
170
180
|
css: _styles2.elementBeforeIconStyles
|
|
171
181
|
}, (0, _react2.jsx)(_icons.AddColRightIcon, null)) : undefined
|
|
172
182
|
};
|
|
@@ -182,10 +192,13 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
182
192
|
value: {
|
|
183
193
|
name: 'insert_row'
|
|
184
194
|
},
|
|
195
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
185
196
|
elemAfter: (0, _react2.jsx)("div", {
|
|
186
197
|
css: _shortcut.shortcutStyle
|
|
187
198
|
}, (0, _keymaps.tooltip)(_keymaps.addRowAfter)),
|
|
188
|
-
elemBefore: isDragAndDropEnabled ?
|
|
199
|
+
elemBefore: isDragAndDropEnabled ?
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
201
|
+
(0, _react2.jsx)("span", {
|
|
189
202
|
css: _styles2.elementBeforeIconStyles
|
|
190
203
|
}, (0, _react2.jsx)(_icons.AddRowBelowIcon, null)) : undefined
|
|
191
204
|
};
|
|
@@ -210,10 +223,13 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
210
223
|
value: {
|
|
211
224
|
name: 'clear'
|
|
212
225
|
},
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
213
227
|
elemAfter: (0, _react2.jsx)("div", {
|
|
214
228
|
css: _shortcut.shortcutStyle
|
|
215
229
|
}, (0, _keymaps.tooltip)(_keymaps.backspace)),
|
|
216
|
-
elemBefore: isDragAndDropEnabled ?
|
|
230
|
+
elemBefore: isDragAndDropEnabled ?
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
232
|
+
(0, _react2.jsx)("span", {
|
|
217
233
|
css: _styles2.elementBeforeIconStyles
|
|
218
234
|
}, (0, _react2.jsx)(_crossCircle.default, {
|
|
219
235
|
label: formatMessage(_messages.tableMessages.clearCells, {
|
|
@@ -239,7 +255,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
239
255
|
value: {
|
|
240
256
|
name: 'delete_column'
|
|
241
257
|
},
|
|
242
|
-
elemBefore: isDragAndDropEnabled ?
|
|
258
|
+
elemBefore: isDragAndDropEnabled ?
|
|
259
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
260
|
+
(0, _react2.jsx)("span", {
|
|
243
261
|
css: _styles2.elementBeforeIconStyles
|
|
244
262
|
}, (0, _react2.jsx)(_remove.default, {
|
|
245
263
|
label: formatMessage(_messages.tableMessages.removeColumns, {
|
|
@@ -265,7 +283,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
265
283
|
value: {
|
|
266
284
|
name: 'delete_row'
|
|
267
285
|
},
|
|
268
|
-
elemBefore: isDragAndDropEnabled ?
|
|
286
|
+
elemBefore: isDragAndDropEnabled ?
|
|
287
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
288
|
+
(0, _react2.jsx)("span", {
|
|
269
289
|
css: _styles2.elementBeforeIconStyles
|
|
270
290
|
}, (0, _react2.jsx)(_remove.default, {
|
|
271
291
|
label: formatMessage(_messages.tableMessages.removeRows, {
|
|
@@ -333,17 +353,22 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
333
353
|
});
|
|
334
354
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createOriginalContextMenuItems", function () {
|
|
335
355
|
var items = [];
|
|
356
|
+
var getEditorFeatureFlags = _this.props.getEditorFeatureFlags;
|
|
357
|
+
var _ref2 = getEditorFeatureFlags ? getEditorFeatureFlags() : {},
|
|
358
|
+
_ref2$tableSortColumn = _ref2.tableSortColumnDiscoverability,
|
|
359
|
+
tableSortColumnDiscoverability = _ref2$tableSortColumn === void 0 ? false : _ref2$tableSortColumn;
|
|
360
|
+
var sortColumnItems = _this.createSortColumnItems();
|
|
336
361
|
var backgroundColorItem = _this.createBackgroundColorItem();
|
|
362
|
+
var distributeColumnsItem = _this.createDistributeColumnsItem();
|
|
363
|
+
tableSortColumnDiscoverability && sortColumnItems && items.push.apply(items, (0, _toConsumableArray2.default)(sortColumnItems));
|
|
337
364
|
backgroundColorItem && items.push(backgroundColorItem);
|
|
338
365
|
items.push(_this.createInsertColumnItem());
|
|
339
366
|
items.push(_this.createInsertRowItem());
|
|
340
367
|
items.push(_this.createDeleteColumnItem());
|
|
341
368
|
items.push(_this.createDeleteRowItem());
|
|
342
369
|
items.push.apply(items, (0, _toConsumableArray2.default)(_this.createMergeSplitCellItems()));
|
|
343
|
-
var distributeColumnsItem = _this.createDistributeColumnsItem();
|
|
344
370
|
distributeColumnsItem && items.push(distributeColumnsItem);
|
|
345
|
-
|
|
346
|
-
sortColumnItems && items.push.apply(items, (0, _toConsumableArray2.default)(sortColumnItems));
|
|
371
|
+
!tableSortColumnDiscoverability && sortColumnItems && items.push.apply(items, (0, _toConsumableArray2.default)(sortColumnItems));
|
|
347
372
|
items.push(_this.createClearCellsItem());
|
|
348
373
|
return [{
|
|
349
374
|
items: items
|
|
@@ -374,8 +399,8 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
374
399
|
items[1].items.push(deleteRowItem);
|
|
375
400
|
return items;
|
|
376
401
|
});
|
|
377
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onMenuItemActivated", function (
|
|
378
|
-
var item =
|
|
402
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onMenuItemActivated", function (_ref3) {
|
|
403
|
+
var item = _ref3.item;
|
|
379
404
|
var _this$props10 = _this.props,
|
|
380
405
|
editorView = _this$props10.editorView,
|
|
381
406
|
selectionRect = _this$props10.selectionRect,
|
|
@@ -389,11 +414,11 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
389
414
|
targetCellPosition = _getPluginState11.targetCellPosition,
|
|
390
415
|
_getPluginState11$isT = _getPluginState11.isTableScalingEnabled,
|
|
391
416
|
isTableScalingEnabled = _getPluginState11$isT === void 0 ? false : _getPluginState11$isT;
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
tableDuplicateCellColouring =
|
|
395
|
-
|
|
396
|
-
tableWithFixedColumnWidthsOption =
|
|
417
|
+
var _ref4 = getEditorFeatureFlags ? getEditorFeatureFlags() : {},
|
|
418
|
+
_ref4$tableDuplicateC = _ref4.tableDuplicateCellColouring,
|
|
419
|
+
tableDuplicateCellColouring = _ref4$tableDuplicateC === void 0 ? false : _ref4$tableDuplicateC,
|
|
420
|
+
_ref4$tableWithFixedC = _ref4.tableWithFixedColumnWidthsOption,
|
|
421
|
+
tableWithFixedColumnWidthsOption = _ref4$tableWithFixedC === void 0 ? false : _ref4$tableWithFixedC;
|
|
397
422
|
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption && (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.use-increased-scaling-percent');
|
|
398
423
|
switch (item.value.name) {
|
|
399
424
|
case 'sort_column_desc':
|
|
@@ -468,8 +493,8 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
468
493
|
isSubmenuOpen: false
|
|
469
494
|
});
|
|
470
495
|
});
|
|
471
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleItemMouseEnter", function (
|
|
472
|
-
var item =
|
|
496
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleItemMouseEnter", function (_ref5) {
|
|
497
|
+
var item = _ref5.item;
|
|
473
498
|
var _this$props12 = _this.props,
|
|
474
499
|
_this$props12$editorV = _this$props12.editorView,
|
|
475
500
|
state = _this$props12$editorV.state,
|
|
@@ -492,8 +517,8 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
492
517
|
(0, _commands.hoverMergedCells)()(state, dispatch);
|
|
493
518
|
}
|
|
494
519
|
});
|
|
495
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleItemMouseLeave", function (
|
|
496
|
-
var item =
|
|
520
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleItemMouseLeave", function (_ref6) {
|
|
521
|
+
var item = _ref6.item;
|
|
497
522
|
var _this$props$editorVie2 = _this.props.editorView,
|
|
498
523
|
state = _this$props$editorVie2.state,
|
|
499
524
|
dispatch = _this$props$editorVie2.dispatch;
|
|
@@ -15,10 +15,13 @@ var _templateObject;
|
|
|
15
15
|
var cellColourPreviewStyles = exports.cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
|
|
16
16
|
return (0, _react.css)({
|
|
17
17
|
'&::before': {
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
19
|
background: selectedColor
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
22
|
};
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
22
25
|
var elementBeforeIconStyles = exports.elementBeforeIconStyles = (0, _react.css)({
|
|
23
26
|
marginRight: "var(--ds-space-negative-075, -6px)",
|
|
24
27
|
display: 'flex'
|
|
@@ -213,10 +213,12 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
213
213
|
position: 'fixed',
|
|
214
214
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
215
215
|
top: pos.top,
|
|
216
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
217
217
|
zIndex: _consts.stickyRowZIndex,
|
|
218
218
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
219
|
-
left: rect.left + (pos.left || 0) - (this.state.selectionType === 'column' ? this.state.scrollLeft : 0) - (
|
|
219
|
+
left: rect.left + (pos.left || 0) - (this.state.selectionType === 'column' ? this.state.scrollLeft : 0) - (
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
221
|
+
this.props.isNumberColumnEnabled ? _editorSharedStyles.akEditorTableNumberColumnWidth : 0)
|
|
220
222
|
}
|
|
221
223
|
}, button), mountTo);
|
|
222
224
|
}
|
|
@@ -100,8 +100,16 @@ var MapDragMenuOptionIdToMessage = {
|
|
|
100
100
|
plural: null
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
var
|
|
104
|
-
var
|
|
103
|
+
var getGroupedDragMenuConfig = function getGroupedDragMenuConfig(tableSortColumnDiscoverability) {
|
|
104
|
+
var groupedDragMenuConfig = [['add_row_above', 'add_row_below', 'add_column_left', 'add_column_right', 'distribute_columns', 'clear_cells', 'delete_row', 'delete_column'], ['move_column_left', 'move_column_right', 'move_row_up', 'move_row_down']];
|
|
105
|
+
var sortColumnItems = ['sort_column_asc', 'sort_column_desc'];
|
|
106
|
+
tableSortColumnDiscoverability ? groupedDragMenuConfig.unshift(sortColumnItems) : groupedDragMenuConfig.push(sortColumnItems);
|
|
107
|
+
return groupedDragMenuConfig;
|
|
108
|
+
};
|
|
109
|
+
var convertToDropdownItems = function convertToDropdownItems(dragMenuConfig, formatMessage) {
|
|
110
|
+
var tableSortColumnDiscoverability = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
111
|
+
var selectionRect = arguments.length > 3 ? arguments[3] : undefined;
|
|
112
|
+
var groupedDragMenuConfig = getGroupedDragMenuConfig(tableSortColumnDiscoverability);
|
|
105
113
|
var menuItemsArr = (0, _toConsumableArray2.default)(Array(groupedDragMenuConfig.length)).map(function () {
|
|
106
114
|
return [];
|
|
107
115
|
});
|
|
@@ -149,11 +157,14 @@ var convertToDropdownItems = function convertToDropdownItems(dragMenuConfig, for
|
|
|
149
157
|
name: item.id
|
|
150
158
|
},
|
|
151
159
|
isDisabled: item.disabled,
|
|
152
|
-
elemBefore: item.icon ?
|
|
160
|
+
elemBefore: item.icon ?
|
|
161
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
162
|
+
(0, _react2.jsx)("span", {
|
|
153
163
|
css: _styles2.elementBeforeIconStyles
|
|
154
164
|
}, (0, _react2.jsx)(item.icon, {
|
|
155
165
|
label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options)
|
|
156
166
|
})) : undefined,
|
|
167
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
157
168
|
elemAfter: item.keymap ? (0, _react2.jsx)("div", {
|
|
158
169
|
css: _shortcut.shortcutStyle
|
|
159
170
|
}, item.keymap) : undefined
|
|
@@ -194,7 +205,8 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
194
205
|
isTableScalingEnabled = _ref.isTableScalingEnabled,
|
|
195
206
|
tableDuplicateCellColouring = _ref.tableDuplicateCellColouring,
|
|
196
207
|
shouldUseIncreasedScalingPercent = _ref.shouldUseIncreasedScalingPercent,
|
|
197
|
-
isTableFixedColumnWidthsOptionEnabled = _ref.isTableFixedColumnWidthsOptionEnabled
|
|
208
|
+
isTableFixedColumnWidthsOptionEnabled = _ref.isTableFixedColumnWidthsOptionEnabled,
|
|
209
|
+
tableSortColumnDiscoverability = _ref.tableSortColumnDiscoverability;
|
|
198
210
|
var state = editorView.state,
|
|
199
211
|
dispatch = editorView.dispatch;
|
|
200
212
|
var selection = state.selection;
|
|
@@ -218,8 +230,8 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
218
230
|
hasMergedCellsInTable = (0, _utils3.getMergedCellsPositions)(state.tr).length > 0;
|
|
219
231
|
}
|
|
220
232
|
var allowBackgroundColor = (_pluginConfig$allowBa = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowBackgroundColor) !== null && _pluginConfig$allowBa !== void 0 ? _pluginConfig$allowBa : false;
|
|
221
|
-
var dragMenuConfig = (0, _dragMenu.getDragMenuConfig)(direction, getEditorContainerWidth, !shouldMoveDisabled, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.isHeaderRowRequired, isTableScalingEnabled, tableDuplicateCellColouring, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent);
|
|
222
|
-
var _convertToDropdownIte = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect),
|
|
233
|
+
var dragMenuConfig = (0, _dragMenu.getDragMenuConfig)(direction, getEditorContainerWidth, !shouldMoveDisabled, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.isHeaderRowRequired, isTableScalingEnabled, tableDuplicateCellColouring, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, tableSortColumnDiscoverability);
|
|
234
|
+
var _convertToDropdownIte = convertToDropdownItems(dragMenuConfig, formatMessage, tableSortColumnDiscoverability, selectionRect),
|
|
223
235
|
menuItems = _convertToDropdownIte.menuItems,
|
|
224
236
|
menuCallback = _convertToDropdownIte.menuCallback;
|
|
225
237
|
var handleSubMenuRef = function handleSubMenuRef(ref) {
|
|
@@ -257,7 +269,9 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
257
269
|
value: {
|
|
258
270
|
name: 'background'
|
|
259
271
|
},
|
|
260
|
-
elemBefore:
|
|
272
|
+
elemBefore:
|
|
273
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
274
|
+
(0, _react2.jsx)("span", {
|
|
261
275
|
css: _styles2.elementBeforeIconStyles
|
|
262
276
|
}, (0, _react2.jsx)(_backgroundColor.default, {
|
|
263
277
|
label: formatMessage(_messages.tableMessages.backgroundColor),
|
|
@@ -265,9 +279,12 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
265
279
|
})),
|
|
266
280
|
elemAfter: (0, _react2.jsx)("div", {
|
|
267
281
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
268
|
-
className: _styles.DropdownMenuSharedCssClassName.SUBMENU
|
|
269
|
-
css
|
|
282
|
+
className: _styles.DropdownMenuSharedCssClassName.SUBMENU
|
|
283
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
284
|
+
,
|
|
285
|
+
css: (0, _styles2.dragMenuBackgroundColorStyles)(tableSortColumnDiscoverability)
|
|
270
286
|
}, (0, _react2.jsx)("div", {
|
|
287
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
271
288
|
css: (0, _styles2.cellColourPreviewStyles)(background)
|
|
272
289
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
273
290
|
,
|
|
@@ -322,7 +339,9 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
322
339
|
value: {
|
|
323
340
|
name: 'header_column'
|
|
324
341
|
},
|
|
325
|
-
elemAfter:
|
|
342
|
+
elemAfter:
|
|
343
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
344
|
+
(0, _react2.jsx)("div", {
|
|
326
345
|
css: _styles2.toggleStyles
|
|
327
346
|
}, (0, _react2.jsx)(_toggle.default, {
|
|
328
347
|
id: "toggle-header-column",
|
|
@@ -335,7 +354,9 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
335
354
|
value: {
|
|
336
355
|
name: 'header_row'
|
|
337
356
|
},
|
|
338
|
-
elemAfter:
|
|
357
|
+
elemAfter:
|
|
358
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
359
|
+
(0, _react2.jsx)("div", {
|
|
339
360
|
css: _styles2.toggleStyles
|
|
340
361
|
}, (0, _react2.jsx)(_toggle.default, {
|
|
341
362
|
id: "toggle-header-row",
|
|
@@ -351,7 +372,9 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
351
372
|
value: {
|
|
352
373
|
name: 'row_numbers'
|
|
353
374
|
},
|
|
354
|
-
elemAfter:
|
|
375
|
+
elemAfter:
|
|
376
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
377
|
+
(0, _react2.jsx)("div", {
|
|
355
378
|
css: _styles2.toggleStyles
|
|
356
379
|
}, (0, _react2.jsx)(_toggle.default, {
|
|
357
380
|
id: "toggle-row-numbers",
|
|
@@ -457,7 +480,7 @@ var DragMenu = exports.DragMenu = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
457
480
|
return null;
|
|
458
481
|
}
|
|
459
482
|
if (allowBackgroundColor) {
|
|
460
|
-
menuItems[0].items.unshift(createBackgroundColorMenuItem());
|
|
483
|
+
tableSortColumnDiscoverability ? menuItems[1].items.unshift(createBackgroundColorMenuItem()) : menuItems[0].items.unshift(createBackgroundColorMenuItem());
|
|
461
484
|
}
|
|
462
485
|
|
|
463
486
|
// If first row, add toggle for Header row, default is true
|
|
@@ -41,7 +41,9 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
41
41
|
_ref2$tableDuplicateC = _ref2.tableDuplicateCellColouring,
|
|
42
42
|
tableDuplicateCellColouring = _ref2$tableDuplicateC === void 0 ? false : _ref2$tableDuplicateC,
|
|
43
43
|
_ref2$tableWithFixedC = _ref2.tableWithFixedColumnWidthsOption,
|
|
44
|
-
tableWithFixedColumnWidthsOption = _ref2$tableWithFixedC === void 0 ? false : _ref2$tableWithFixedC
|
|
44
|
+
tableWithFixedColumnWidthsOption = _ref2$tableWithFixedC === void 0 ? false : _ref2$tableWithFixedC,
|
|
45
|
+
_ref2$tableSortColumn = _ref2.tableSortColumnDiscoverability,
|
|
46
|
+
tableSortColumnDiscoverability = _ref2$tableSortColumn === void 0 ? false : _ref2$tableSortColumn;
|
|
45
47
|
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption && (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.use-increased-scaling-percent');
|
|
46
48
|
return /*#__PURE__*/_react.default.createElement(_ui.Popup, {
|
|
47
49
|
alignX: direction === 'row' ? 'right' : undefined,
|
|
@@ -79,7 +81,8 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
79
81
|
isTableScalingEnabled: isTableScalingEnabled,
|
|
80
82
|
tableDuplicateCellColouring: tableDuplicateCellColouring,
|
|
81
83
|
shouldUseIncreasedScalingPercent: shouldUseIncreasedScalingPercent,
|
|
82
|
-
isTableFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption
|
|
84
|
+
isTableFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption,
|
|
85
|
+
tableSortColumnDiscoverability: tableSortColumnDiscoverability
|
|
83
86
|
}));
|
|
84
87
|
};
|
|
85
88
|
FloatingDragMenu.displayName = 'FloatingDragMenu';
|
|
@@ -15,28 +15,39 @@ var _templateObject;
|
|
|
15
15
|
var cellColourPreviewStyles = exports.cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
|
|
16
16
|
return (0, _react.css)({
|
|
17
17
|
'&::before': {
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
19
|
background: selectedColor
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
22
|
};
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
22
25
|
var elementBeforeIconStyles = exports.elementBeforeIconStyles = (0, _react.css)({
|
|
23
26
|
marginRight: "var(--ds-space-negative-075, -6px)",
|
|
24
27
|
display: 'flex'
|
|
25
28
|
});
|
|
26
29
|
|
|
27
30
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
28
|
-
var dragMenuBackgroundColorStyles = exports.dragMenuBackgroundColorStyles =
|
|
31
|
+
var dragMenuBackgroundColorStyles = exports.dragMenuBackgroundColorStyles = function dragMenuBackgroundColorStyles() {
|
|
32
|
+
var tableSortColumnDiscoverability = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
33
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tborder-radius: ", ";\n\t\tbackground: ", ";\n\t\tbox-shadow: ", ";\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\ttop: ", "px; // move the submenu down when 'sort increasing/decreasing' appear before background color picker\n\t\tleft: ", "px;\n\t\tpadding: ", ";\n\n\t\t> div {\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n\t.", " {\n\t\tdisplay: flex;\n\n\t\t&::before {\n\t\t\tcontent: '';\n\t\t\tdisplay: block;\n\t\t\tborder: 1px solid ", ";\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t}\n\n\t\t&::after {\n\t\t\tcontent: '\u203A';\n\t\t\tmargin-left: ", ";\n\t\t\tline-height: 14px;\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), _types.TableCssClassName.DRAG_SUBMENU, "var(--ds-border-radius, 3px)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N60A, ", 0 0 1px ").concat(_colors.N60A), ")"), tableSortColumnDiscoverability ? _consts.TABLE_DRAG_MENU_PADDING_TOP + _consts.TABLE_DRAG_MENU_SORT_GROUP_HEIGHT + _consts.TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT : 0, _consts.dragMenuDropdownWidth, "var(--ds-space-100, 8px)", _types.TableCssClassName.DRAG_SUBMENU_ICON, _adfSchema.tableBackgroundBorderColor, "var(--ds-border-radius, 3px)", "var(--ds-space-050, 4px)", "var(--ds-icon, ".concat(_colors.N90, ")"));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
29
37
|
var toggleStyles = exports.toggleStyles = (0, _react.css)({
|
|
30
38
|
display: 'flex',
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
31
40
|
"input[type='checkbox']": {
|
|
32
41
|
width: '30px',
|
|
33
42
|
height: '14px',
|
|
34
43
|
pointerEvents: 'initial',
|
|
35
44
|
cursor: 'pointer'
|
|
36
45
|
},
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
47
|
'> label': {
|
|
38
48
|
margin: '0px',
|
|
39
49
|
pointerEvents: 'none',
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
40
51
|
'> span': {
|
|
41
52
|
pointerEvents: 'none'
|
|
42
53
|
}
|
|
@@ -115,7 +115,9 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
115
115
|
style: {
|
|
116
116
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
117
117
|
marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
|
|
118
|
-
borderLeft:
|
|
118
|
+
borderLeft:
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
120
|
+
isDragAndDropEnabled && tableActive ? "1px solid ".concat(_consts.tableBorderColor) : undefined
|
|
119
121
|
},
|
|
120
122
|
contentEditable: false
|
|
121
123
|
}, rowHeights.map(function (rowHeight, index) {
|
|
@@ -90,7 +90,7 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
|
90
90
|
marginTop: "".concat(marginTop, "px"),
|
|
91
91
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
92
92
|
top: thisRowSticky ? "".concat(_this2.props.stickyTop + 3, "px") : undefined,
|
|
93
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
93
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
94
94
|
paddingTop: thisRowSticky ? "".concat(_consts.tableControlsSpacing, "px") : undefined
|
|
95
95
|
}
|
|
96
96
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -202,9 +202,11 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
202
202
|
className: _types.TableCssClassName.DRAG_ROW_CONTROLS,
|
|
203
203
|
style: {
|
|
204
204
|
gridTemplateRows: heights,
|
|
205
|
-
gridTemplateColumns: isDragging ?
|
|
205
|
+
gridTemplateColumns: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
206
|
+
"".concat(_consts.dropTargetExtendedWidth, "px 14px ").concat(tableWidth, "px") : '0px 14px 0px',
|
|
206
207
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
207
|
-
left: isDragging ?
|
|
208
|
+
left: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
209
|
+
"-".concat(_consts.dropTargetExtendedWidth + 2, "px") : "var(--ds-space-negative-025, -2px)"
|
|
208
210
|
},
|
|
209
211
|
onMouseMove: handleMouseMove,
|
|
210
212
|
contentEditable: false
|
|
@@ -82,6 +82,8 @@ var tableStyles = exports.tableStyles = function tableStyles(props) {
|
|
|
82
82
|
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror.", " {\n\t\t.", " {\n\t\t\toverflow-x: auto;\n\t\t\t", ";\n\t\t}\n\t}\n\n\t.ProseMirror.", " {\n\t\tcursor: col-resize;\n\t}\n\n\t", "\n"])), baseTableStyles(props), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.TABLE_NODE_WRAPPER, _scrollbar.scrollbarStyles, _types.TableCssClassName.RESIZE_CURSOR, shadowSentinelStyles);
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
85
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
86
86
|
var tableFullPageEditorStyles = exports.tableFullPageEditorStyles = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror .", " > table {\n\t\tmargin-left: 0;\n\t\t// 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n\t\tmargin-right: -1px;\n\t\twidth: 100%;\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER);
|
|
87
|
+
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
87
89
|
var tableCommentEditorStyles = exports.tableCommentEditorStyles = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror .", " > table {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t\t", ";\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _scrollbar.scrollbarStyles);
|