@atlaskit/editor-plugin-table 18.1.3 → 18.1.5
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/TableComponent.js +9 -3
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +4 -1
- package/dist/cjs/nodeviews/TableContainer.js +3 -1
- package/dist/cjs/nodeviews/TableResizer.js +3 -1
- package/dist/cjs/ui/ContentComponent.js +3 -1
- package/dist/cjs/ui/DragPreview/index.js +6 -2
- package/dist/cjs/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +3 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +3 -1
- package/dist/cjs/ui/FloatingContextualButton/styles.js +8 -9
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +10 -3
- package/dist/cjs/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +1 -2
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +12 -4
- package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +15 -5
- package/dist/cjs/ui/FloatingDragMenu/styles.js +1 -2
- package/dist/cjs/ui/SizeSelector/index.js +3 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +3 -1
- package/dist/cjs/ui/common-styles.js +2 -3
- package/dist/cjs/ui/consts.js +17 -18
- package/dist/cjs/ui/icons/DragInMotionIcon.js +1 -1
- package/dist/cjs/ui/toolbar.js +6 -2
- package/dist/cjs/ui/ui-styles.js +10 -11
- package/dist/es2019/nodeviews/TableComponent.js +9 -3
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +4 -1
- package/dist/es2019/nodeviews/TableContainer.js +3 -1
- package/dist/es2019/nodeviews/TableResizer.js +3 -1
- package/dist/es2019/ui/ContentComponent.js +3 -1
- package/dist/es2019/ui/DragPreview/index.js +6 -2
- package/dist/es2019/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +3 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +3 -1
- package/dist/es2019/ui/FloatingContextualButton/styles.js +8 -9
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +10 -3
- package/dist/es2019/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +4 -5
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +12 -4
- package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +15 -5
- package/dist/es2019/ui/FloatingDragMenu/styles.js +3 -4
- package/dist/es2019/ui/SizeSelector/index.js +3 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +3 -1
- package/dist/es2019/ui/common-styles.js +26 -28
- package/dist/es2019/ui/consts.js +18 -19
- package/dist/es2019/ui/icons/DragInMotionIcon.js +1 -1
- package/dist/es2019/ui/toolbar.js +6 -2
- package/dist/es2019/ui/ui-styles.js +25 -38
- package/dist/esm/nodeviews/TableComponent.js +9 -3
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +4 -1
- package/dist/esm/nodeviews/TableContainer.js +3 -1
- package/dist/esm/nodeviews/TableResizer.js +3 -1
- package/dist/esm/ui/ContentComponent.js +3 -1
- package/dist/esm/ui/DragPreview/index.js +6 -2
- package/dist/esm/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +3 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +3 -1
- package/dist/esm/ui/FloatingContextualButton/styles.js +8 -9
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +10 -3
- package/dist/esm/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/esm/ui/FloatingContextualMenu/styles.js +1 -2
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +12 -4
- package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +15 -5
- package/dist/esm/ui/FloatingDragMenu/styles.js +1 -2
- package/dist/esm/ui/SizeSelector/index.js +3 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +3 -1
- package/dist/esm/ui/common-styles.js +2 -3
- package/dist/esm/ui/consts.js +18 -19
- package/dist/esm/ui/icons/DragInMotionIcon.js +1 -1
- package/dist/esm/ui/toolbar.js +6 -2
- package/dist/esm/ui/ui-styles.js +11 -12
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 18.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0f4a08b633f6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f4a08b633f6e) -
|
|
8
|
+
Internal changes to remove unnecessary token fallbacks and imports from `@atlaskit/theme`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 18.1.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 18.1.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -843,7 +843,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
843
843
|
stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
|
|
844
844
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
845
845
|
tableContainerWidth: tableContainerWidth,
|
|
846
|
-
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled
|
|
846
|
+
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled
|
|
847
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
848
|
+
,
|
|
847
849
|
getScrollOffset: function getScrollOffset() {
|
|
848
850
|
var _this5$wrapper;
|
|
849
851
|
return ((_this5$wrapper = _this5.wrapper) === null || _this5$wrapper === void 0 ? void 0 : _this5$wrapper.scrollLeft) || 0;
|
|
@@ -905,11 +907,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
905
907
|
"data-testid": "sticky-scrollbar-sentinel-top"
|
|
906
908
|
}), allowControls && rowControls, isDragAndDropEnabled && /*#__PURE__*/_react.default.createElement(_ExternalDropTargets.ExternalDropTargets, {
|
|
907
909
|
editorView: view,
|
|
908
|
-
node: node
|
|
910
|
+
node: node
|
|
911
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
912
|
+
,
|
|
909
913
|
getScrollOffset: function getScrollOffset() {
|
|
910
914
|
var _this5$wrapper2;
|
|
911
915
|
return ((_this5$wrapper2 = _this5.wrapper) === null || _this5$wrapper2 === void 0 ? void 0 : _this5$wrapper2.scrollLeft) || 0;
|
|
912
|
-
}
|
|
916
|
+
}
|
|
917
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
918
|
+
,
|
|
913
919
|
getTableWrapperWidth: function getTableWrapperWidth() {
|
|
914
920
|
var _this5$wrapper3;
|
|
915
921
|
return ((_this5$wrapper3 = _this5.wrapper) === null || _this5$wrapper3 === void 0 ? void 0 : _this5$wrapper3.clientWidth) || 760;
|
|
@@ -86,6 +86,7 @@ var TableComponentWithSharedState = exports.TableComponentWithSharedState = func
|
|
|
86
86
|
try {
|
|
87
87
|
currentTablePos = getPos ? getPos() : undefined;
|
|
88
88
|
} catch (e) {
|
|
89
|
+
// eslint-disable-line no-unused-vars
|
|
89
90
|
currentTablePos = undefined;
|
|
90
91
|
}
|
|
91
92
|
var selectedTable = (0, _editorTables.findTable)(view.state.selection);
|
|
@@ -109,7 +110,9 @@ var TableComponentWithSharedState = exports.TableComponentWithSharedState = func
|
|
|
109
110
|
tableActive: tableActive && !isLivePageViewMode && interaction !== 'hasNotHadInteraction',
|
|
110
111
|
ordering: ordering,
|
|
111
112
|
isResizing: isResizing,
|
|
112
|
-
getNode: getNode
|
|
113
|
+
getNode: getNode
|
|
114
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
115
|
+
,
|
|
113
116
|
containerWidth: {
|
|
114
117
|
width: width !== null && width !== void 0 ? width : 0,
|
|
115
118
|
lineLength: lineLength
|
|
@@ -407,7 +407,9 @@ var TableContainer = exports.TableContainer = function TableContainer(_ref5) {
|
|
|
407
407
|
className: (0, _classnames.default)(className, {
|
|
408
408
|
'less-padding': editorWidth < _editorSharedStyles.akEditorMobileBreakoutPoint && !isNested && !(isChromelessEditor && isDragAndDropEnabled)
|
|
409
409
|
}),
|
|
410
|
-
style:
|
|
410
|
+
style:
|
|
411
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
412
|
+
{
|
|
411
413
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
412
414
|
width: 'inherit',
|
|
413
415
|
marginLeft: isChromelessEditor ? 18 : undefined,
|
|
@@ -519,7 +519,9 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
519
519
|
isHandleVisible: isTableSelected,
|
|
520
520
|
needExtendedResizeZone: (0, _expValEquals.expValEquals)('platform_editor_table_resizer_extended_zone', 'isEnabled', true) ? true : !isTableSelected,
|
|
521
521
|
appearance: isTableSelected && isWholeTableInDanger ? 'danger' : undefined,
|
|
522
|
-
handleHighlight: "shadow"
|
|
522
|
+
handleHighlight: "shadow"
|
|
523
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
524
|
+
,
|
|
523
525
|
handleTooltipContent: function handleTooltipContent(_ref3) {
|
|
524
526
|
var update = _ref3.update;
|
|
525
527
|
updateTooltip.current = update;
|
|
@@ -188,7 +188,9 @@ var ContentComponentInternal = function ContentComponentInternal(_ref) {
|
|
|
188
188
|
alignY: 'bottom',
|
|
189
189
|
stick: true,
|
|
190
190
|
forcePlacement: true,
|
|
191
|
-
zIndex: _editorSharedStyles.akEditorFloatingPanelZIndex
|
|
191
|
+
zIndex: _editorSharedStyles.akEditorFloatingPanelZIndex
|
|
192
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
193
|
+
,
|
|
192
194
|
offset: [0, 10]
|
|
193
195
|
}), isTableSelectorEnabled && isSizeSelectorOpen && /*#__PURE__*/_react.default.createElement(_SizeSelector.SizeSelector, {
|
|
194
196
|
api: api,
|
|
@@ -25,12 +25,16 @@ var DragPreview = exports.DragPreview = function DragPreview(_ref) {
|
|
|
25
25
|
var marginTop = direction === 'row' ? height / 2 - 14 : -10;
|
|
26
26
|
var transform = direction === 'row' ? 'rotate(90deg)' : 'none';
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
28
|
-
xcss: boxStyles
|
|
28
|
+
xcss: boxStyles
|
|
29
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
30
|
+
,
|
|
29
31
|
style: {
|
|
30
32
|
width: "".concat(width, "px"),
|
|
31
33
|
height: "".concat(height, "px")
|
|
32
34
|
}
|
|
33
|
-
}, /*#__PURE__*/_react.default.createElement(_DragInMotionIcon.DragInMotionIcon
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_DragInMotionIcon.DragInMotionIcon
|
|
36
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
37
|
+
, {
|
|
34
38
|
style: {
|
|
35
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
36
40
|
position: 'absolute',
|
|
@@ -49,7 +49,9 @@ var FloatingAlignmentButtons = exports.FloatingAlignmentButtons = function Float
|
|
|
49
49
|
}) : undefined,
|
|
50
50
|
title: item.title,
|
|
51
51
|
selected: item.selected,
|
|
52
|
-
disabled: item.disabled
|
|
52
|
+
disabled: item.disabled
|
|
53
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
54
|
+
,
|
|
53
55
|
onClick: function onClick() {
|
|
54
56
|
dispatchCommand(item.onClick);
|
|
55
57
|
},
|
|
@@ -165,7 +165,9 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
|
|
|
165
165
|
target: targetCellRef,
|
|
166
166
|
mountTo: tableWrapper || mountPoint,
|
|
167
167
|
boundariesElement: targetCellRef,
|
|
168
|
-
scrollableElement: scrollableElement
|
|
168
|
+
scrollableElement: scrollableElement
|
|
169
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
170
|
+
,
|
|
169
171
|
offset: [BUTTON_OFFSET, -BUTTON_OFFSET],
|
|
170
172
|
forcePlacement: true,
|
|
171
173
|
allowOutOfBounds: true,
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.tableFloatingCellButtonStyles = exports.tableFloatingCellButtonSelectedStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
9
8
|
var _consts = require("../consts");
|
|
10
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
10
|
|
|
@@ -14,7 +13,7 @@ var tableFloatingCellButtonStyles = exports.tableFloatingCellButtonStyles = func
|
|
|
14
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
15
14
|
'> div': {
|
|
16
15
|
// Sits behind button to provide surface-color background
|
|
17
|
-
background: "var(--ds-surface,
|
|
16
|
+
background: "var(--ds-surface, #FFFFFF)",
|
|
18
17
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
19
18
|
display: 'flex',
|
|
20
19
|
// 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,10 +23,10 @@ var tableFloatingCellButtonStyles = exports.tableFloatingCellButtonStyles = func
|
|
|
24
23
|
},
|
|
25
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
26
25
|
'&& button': {
|
|
27
|
-
background: "var(--ds-background-neutral,
|
|
26
|
+
background: "var(--ds-background-neutral, #0515240F)",
|
|
28
27
|
flexDirection: 'column',
|
|
29
28
|
margin: "var(--ds-space-025, 2px)",
|
|
30
|
-
outline: "2px solid ".concat("var(--ds-surface,
|
|
29
|
+
outline: "2px solid ".concat("var(--ds-surface, #FFFFFF)"),
|
|
31
30
|
borderRadius: '1px',
|
|
32
31
|
padding: 0,
|
|
33
32
|
height: 'calc(100% - 4px)',
|
|
@@ -35,11 +34,11 @@ var tableFloatingCellButtonStyles = exports.tableFloatingCellButtonStyles = func
|
|
|
35
34
|
},
|
|
36
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
37
36
|
'&& button:hover': {
|
|
38
|
-
background: "var(--ds-background-neutral-hovered,
|
|
37
|
+
background: "var(--ds-background-neutral-hovered, #0B120E24)"
|
|
39
38
|
},
|
|
40
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
41
40
|
'&& button:active': {
|
|
42
|
-
background: "var(--ds-background-neutral-pressed,
|
|
41
|
+
background: "var(--ds-background-neutral-pressed, #080F214A)"
|
|
43
42
|
},
|
|
44
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
45
44
|
'&& button > span': {
|
|
@@ -55,15 +54,15 @@ var tableFloatingCellButtonSelectedStyles = exports.tableFloatingCellButtonSelec
|
|
|
55
54
|
return (0, _react.css)({
|
|
56
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
57
56
|
'&& button': {
|
|
58
|
-
background: "var(--ds-background-selected,
|
|
57
|
+
background: "var(--ds-background-selected, #E9F2FE)"
|
|
59
58
|
},
|
|
60
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
61
60
|
'&& button:hover': {
|
|
62
|
-
background: "var(--ds-background-selected-hovered,
|
|
61
|
+
background: "var(--ds-background-selected-hovered, #CFE1FD)"
|
|
63
62
|
},
|
|
64
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
65
64
|
'&& button:active': {
|
|
66
|
-
background: "var(--ds-background-selected-pressed,
|
|
65
|
+
background: "var(--ds-background-selected-pressed, #8FB8F6)"
|
|
67
66
|
}
|
|
68
67
|
});
|
|
69
68
|
};
|
|
@@ -163,7 +163,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
163
163
|
}, (0, _react2.jsx)(_uiMenu.ArrowKeyNavigationProvider, {
|
|
164
164
|
type: _uiMenu.ArrowKeyNavigationType.COLOR,
|
|
165
165
|
selectedRowIndex: selectedRowIndex || 0,
|
|
166
|
-
selectedColumnIndex: selectedColumnIndex || 0
|
|
166
|
+
selectedColumnIndex: selectedColumnIndex || 0
|
|
167
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
168
|
+
,
|
|
167
169
|
handleClose: function handleClose() {
|
|
168
170
|
_this.setState({
|
|
169
171
|
isSubmenuOpen: false
|
|
@@ -183,7 +185,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
183
185
|
}, (0, _react2.jsx)(_uiColor.ColorPalette, {
|
|
184
186
|
cols: 7,
|
|
185
187
|
onClick: _this.setColor,
|
|
186
|
-
selectedColor: (node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.background) || '#ffffff'
|
|
188
|
+
selectedColor: (node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.background) || '#ffffff'
|
|
189
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
190
|
+
,
|
|
187
191
|
paletteOptions: {
|
|
188
192
|
palette: _uiColor.cellBackgroundColorPalette,
|
|
189
193
|
paletteColorTooltipMessages: _uiColor.backgroundPaletteTooltipMessages,
|
|
@@ -788,6 +792,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
788
792
|
}, (0, _react2.jsx)(_uiMenu.DropdownMenu
|
|
789
793
|
//This needs be removed when the a11y is completely handled
|
|
790
794
|
//Disabling key navigation now as it works only partially
|
|
795
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
791
796
|
, {
|
|
792
797
|
arrowKeyNavigationProviderOptions: {
|
|
793
798
|
type: _uiMenu.ArrowKeyNavigationType.MENU,
|
|
@@ -800,7 +805,9 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
800
805
|
onMouseEnter: this.handleItemMouseEnter,
|
|
801
806
|
onMouseLeave: this.handleItemMouseLeave,
|
|
802
807
|
fitHeight: 188,
|
|
803
|
-
fitWidth: isDragAndDropEnabled ? _consts.contextualMenuDropdownWidthDnD : _consts.contextualMenuDropdownWidth
|
|
808
|
+
fitWidth: isDragAndDropEnabled ? _consts.contextualMenuDropdownWidthDnD : _consts.contextualMenuDropdownWidth
|
|
809
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
810
|
+
,
|
|
804
811
|
shouldFocusFirstItem: function shouldFocusFirstItem() {
|
|
805
812
|
return Boolean(isCellMenuOpenByKeyboard);
|
|
806
813
|
},
|
|
@@ -88,7 +88,9 @@ var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
|
|
|
88
88
|
// in table, but below floating dialogs like typeaheads, pickers, etc.
|
|
89
89
|
,
|
|
90
90
|
zIndex: parentSticky ? _editorSharedStyles.akEditorFloatingDialogZIndex : _editorSharedStyles.akEditorFloatingOverlapPanelZIndex,
|
|
91
|
-
forcePlacement: true
|
|
91
|
+
forcePlacement: true
|
|
92
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
93
|
+
,
|
|
92
94
|
offset: [-7, 0],
|
|
93
95
|
stick: true
|
|
94
96
|
}, (0, _react.jsx)("div", {
|
|
@@ -97,7 +99,9 @@ var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
|
|
|
97
99
|
// Remove ! during platform_editor_hydratable_ui cleanup
|
|
98
100
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
99
101
|
, {
|
|
100
|
-
editorView: editorView
|
|
102
|
+
editorView: editorView
|
|
103
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
104
|
+
,
|
|
101
105
|
offset: [_consts.contextualMenuTriggerSize / 2, -_consts.contextualMenuTriggerSize],
|
|
102
106
|
isOpen: isOpen,
|
|
103
107
|
targetCellPosition: targetCellPosition,
|
|
@@ -8,7 +8,6 @@ exports.tablePopupStyles = exports.cellColourPreviewStyles = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
12
11
|
var _types = require("../../types");
|
|
13
12
|
var _consts = require("../consts");
|
|
14
13
|
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -23,5 +22,5 @@ var cellColourPreviewStyles = exports.cellColourPreviewStyles = function cellCol
|
|
|
23
22
|
var tablePopupStyles = exports.tablePopupStyles = function tablePopupStyles(isDragAndDropEnabled
|
|
24
23
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
25
24
|
) {
|
|
26
|
-
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: 0;\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: 20px;\n\t\t\theight: 20px;\n\t\t}\n\n\t\t&::after {\n\t\t\tcontent: '\u203A';\n\t\t\tmargin-left: ", ";\n\t\t\tline-height: 20px;\n\t\t\tcolor: ", ";\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.CONTEXTUAL_SUBMENU, "var(--ds-radius-small, 3px)", "var(--ds-surface-overlay,
|
|
25
|
+
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: 0;\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: 20px;\n\t\t\theight: 20px;\n\t\t}\n\n\t\t&::after {\n\t\t\tcontent: '\u203A';\n\t\t\tmargin-left: ", ";\n\t\t\tline-height: 20px;\n\t\t\tcolor: ", ";\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.CONTEXTUAL_SUBMENU, "var(--ds-radius-small, 3px)", "var(--ds-surface-overlay, #FFFFFF)", "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)", isDragAndDropEnabled ? _consts.contextualMenuDropdownWidthDnD : _consts.contextualMenuDropdownWidth, "var(--ds-space-100, 8px)", _types.TableCssClassName.CONTEXTUAL_MENU_ICON, _adfSchema.tableBackgroundBorderColor, "var(--ds-radius-small, 3px)", "var(--ds-space-050, 4px)", "var(--ds-icon, #292A2E)", _types.TableCssClassName.CONTEXTUAL_MENU_ICON_SMALL, _adfSchema.tableBackgroundBorderColor, "var(--ds-radius-small, 3px)", "var(--ds-space-050, 4px)", "var(--ds-icon, #292A2E)");
|
|
27
26
|
};
|
|
@@ -319,7 +319,9 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
319
319
|
}, (0, _react2.jsx)(_uiMenu.ArrowKeyNavigationProvider, {
|
|
320
320
|
type: _uiMenu.ArrowKeyNavigationType.COLOR,
|
|
321
321
|
selectedRowIndex: selectedRowIndex,
|
|
322
|
-
selectedColumnIndex: selectedColumnIndex
|
|
322
|
+
selectedColumnIndex: selectedColumnIndex
|
|
323
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
324
|
+
,
|
|
323
325
|
handleClose: function handleClose() {
|
|
324
326
|
var keyboardEvent = new KeyboardEvent('keydown', {
|
|
325
327
|
key: 'ArrowDown',
|
|
@@ -334,11 +336,15 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
334
336
|
isPopupPositioned: true,
|
|
335
337
|
isOpenedByKeyboard: isKeyboardModeActive
|
|
336
338
|
}, (0, _react2.jsx)(_uiColor.ColorPalette, {
|
|
337
|
-
cols: _consts.colorPalletteColumns
|
|
339
|
+
cols: _consts.colorPalletteColumns
|
|
340
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
341
|
+
,
|
|
338
342
|
onClick: function onClick(color) {
|
|
339
343
|
setColor(color);
|
|
340
344
|
},
|
|
341
|
-
selectedColor: background
|
|
345
|
+
selectedColor: background
|
|
346
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
347
|
+
,
|
|
342
348
|
paletteOptions: {
|
|
343
349
|
palette: _uiColor.cellBackgroundColorPalette,
|
|
344
350
|
paletteColorTooltipMessages: _uiColor.backgroundPaletteTooltipMessages,
|
|
@@ -568,7 +574,9 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
568
574
|
api: api,
|
|
569
575
|
userIntent: "tableDragMenuPopupOpen"
|
|
570
576
|
}, (0, _react2.jsx)(_DropdownMenu.DropdownMenu, {
|
|
571
|
-
disableKeyboardHandling: isSubmenuOpen
|
|
577
|
+
disableKeyboardHandling: isSubmenuOpen
|
|
578
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
579
|
+
,
|
|
572
580
|
section: {
|
|
573
581
|
hasSeparator: true
|
|
574
582
|
},
|
|
@@ -60,15 +60,21 @@ var DropdownMenu = exports.DropdownMenu = function DropdownMenu(_ref) {
|
|
|
60
60
|
return /*#__PURE__*/_react.default.createElement(DropListWithOutsideListeners, {
|
|
61
61
|
isOpen: true,
|
|
62
62
|
shouldFitContainer: true,
|
|
63
|
-
position: popupPlacement.join(' ')
|
|
63
|
+
position: popupPlacement.join(' ')
|
|
64
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
65
|
+
,
|
|
64
66
|
handleClickOutside: function handleClickOutside() {
|
|
65
67
|
return handleClose('editor');
|
|
66
|
-
}
|
|
68
|
+
}
|
|
69
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
70
|
+
,
|
|
67
71
|
handleEscapeKeydown: function handleEscapeKeydown() {
|
|
68
72
|
if (!disableKeyboardHandling) {
|
|
69
73
|
handleClose('handle');
|
|
70
74
|
}
|
|
71
|
-
}
|
|
75
|
+
}
|
|
76
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
77
|
+
,
|
|
72
78
|
handleEnterKeydown: function handleEnterKeydown(e) {
|
|
73
79
|
if (!disableKeyboardHandling) {
|
|
74
80
|
e.preventDefault();
|
|
@@ -164,13 +170,17 @@ var DropdownMenu = exports.DropdownMenu = function DropdownMenu(_ref) {
|
|
|
164
170
|
target: targetRefDiv,
|
|
165
171
|
mountTo: mountPoint,
|
|
166
172
|
boundariesElement: boundariesElement,
|
|
167
|
-
scrollableElement: scrollableElement
|
|
173
|
+
scrollableElement: scrollableElement
|
|
174
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
175
|
+
,
|
|
168
176
|
onPlacementChanged: function onPlacementChanged(placement) {
|
|
169
177
|
setPopupPlacement(placement);
|
|
170
178
|
},
|
|
171
179
|
fitHeight: fitHeight,
|
|
172
180
|
fitWidth: fitWidth,
|
|
173
|
-
zIndex: _editorSharedStyles.akEditorFloatingPanelZIndex
|
|
181
|
+
zIndex: _editorSharedStyles.akEditorFloatingPanelZIndex
|
|
182
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
183
|
+
,
|
|
174
184
|
offset: [offsetX, offsetY],
|
|
175
185
|
allowOutOfBounds: true // required as this popup is child of a parent popup, should be allowed to be out of bound of the parent popup, otherwise horizontal offset is not right
|
|
176
186
|
}, /*#__PURE__*/_react.default.createElement(_uiMenu.ArrowKeyNavigationProvider, {
|
|
@@ -8,7 +8,6 @@ exports.toggleStyles = exports.dragMenuBackgroundColorStyles = exports.cellColou
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
12
11
|
var _types = require("../../types");
|
|
13
12
|
var _consts = require("../consts");
|
|
14
13
|
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -23,7 +22,7 @@ var cellColourPreviewStyles = exports.cellColourPreviewStyles = function cellCol
|
|
|
23
22
|
|
|
24
23
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
25
24
|
var dragMenuBackgroundColorStyles = exports.dragMenuBackgroundColorStyles = function dragMenuBackgroundColorStyles() {
|
|
26
|
-
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-radius-small, 3px)", "var(--ds-surface-overlay,
|
|
25
|
+
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-radius-small, 3px)", "var(--ds-surface-overlay, #FFFFFF)", "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)", _consts.TABLE_DRAG_MENU_PADDING_TOP + _consts.TABLE_DRAG_MENU_SORT_GROUP_HEIGHT + _consts.TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT, _consts.dragMenuDropdownWidth, "var(--ds-space-100, 8px)", _types.TableCssClassName.DRAG_SUBMENU_ICON, _adfSchema.tableBackgroundBorderColor, "var(--ds-radius-small, 3px)", "var(--ds-space-050, 4px)", "var(--ds-icon, #292A2E)");
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -47,7 +47,9 @@ var SizeSelector = exports.SizeSelector = function SizeSelector(_ref) {
|
|
|
47
47
|
var onUnmount = function onUnmount() {
|
|
48
48
|
api === null || api === void 0 || api.core.actions.focus();
|
|
49
49
|
};
|
|
50
|
-
return (0, _react2.jsx)(_ui.TableSelectorPopup
|
|
50
|
+
return (0, _react2.jsx)(_ui.TableSelectorPopup
|
|
51
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
52
|
+
, {
|
|
51
53
|
defaultSize: {
|
|
52
54
|
row: DEFAULT_TABLE_SELECTOR_ROWS,
|
|
53
55
|
col: DEFAULT_TABLE_SELECTOR_COLS
|
|
@@ -258,7 +258,9 @@ var DragControls = exports.DragControls = function DragControls(_ref) {
|
|
|
258
258
|
, {
|
|
259
259
|
key: "drop-target-".concat(index),
|
|
260
260
|
index: index,
|
|
261
|
-
localId: currentNodeLocalId
|
|
261
|
+
localId: currentNodeLocalId
|
|
262
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
263
|
+
,
|
|
262
264
|
style: {
|
|
263
265
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
264
266
|
gridColumn: '1 / span 3',
|