@atlaskit/editor-plugin-table 7.6.2 → 7.6.4
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 +13 -0
- package/dist/cjs/commands/misc.js +3 -2
- package/dist/cjs/nodeviews/TableComponent.js +25 -11
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +87 -0
- package/dist/cjs/nodeviews/TableContainer.js +37 -21
- package/dist/cjs/nodeviews/TableResizer.js +40 -29
- package/dist/cjs/nodeviews/table.js +21 -1
- package/dist/cjs/plugin.js +25 -2
- package/dist/cjs/toolbar.js +5 -4
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +3 -3
- package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +21 -28
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +5 -2
- package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +48 -1
- package/dist/cjs/ui/TableFloatingControls/CornerControls/index.js +6 -0
- package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +47 -0
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
- package/dist/cjs/ui/TableFloatingControls/index.js +25 -3
- package/dist/cjs/ui/common-styles.js +11 -6
- package/dist/cjs/utils/guidelines.js +1 -1
- package/dist/es2019/commands/misc.js +6 -2
- package/dist/es2019/nodeviews/TableComponent.js +27 -12
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +83 -0
- package/dist/es2019/nodeviews/TableContainer.js +24 -6
- package/dist/es2019/nodeviews/TableResizer.js +27 -19
- package/dist/es2019/nodeviews/table.js +21 -1
- package/dist/es2019/plugin.js +26 -3
- package/dist/es2019/toolbar.js +5 -4
- package/dist/es2019/types.js +3 -0
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +3 -3
- package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +20 -27
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -2
- package/dist/es2019/ui/TableFloatingColumnControls/index.js +5 -2
- package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +55 -0
- package/dist/es2019/ui/TableFloatingControls/CornerControls/index.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +42 -0
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
- package/dist/es2019/ui/TableFloatingControls/index.js +26 -4
- package/dist/es2019/ui/common-styles.js +589 -588
- package/dist/es2019/utils/guidelines.js +1 -1
- package/dist/esm/commands/misc.js +3 -2
- package/dist/esm/nodeviews/TableComponent.js +25 -11
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +80 -0
- package/dist/esm/nodeviews/TableContainer.js +37 -21
- package/dist/esm/nodeviews/TableResizer.js +41 -30
- package/dist/esm/nodeviews/table.js +21 -1
- package/dist/esm/plugin.js +26 -3
- package/dist/esm/toolbar.js +5 -4
- package/dist/esm/types.js +3 -0
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +3 -3
- package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +21 -28
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
- package/dist/esm/ui/TableFloatingColumnControls/index.js +5 -2
- package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +47 -0
- package/dist/esm/ui/TableFloatingControls/CornerControls/index.js +1 -1
- package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +40 -0
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
- package/dist/esm/ui/TableFloatingControls/index.js +26 -4
- package/dist/esm/ui/common-styles.js +10 -5
- package/dist/esm/utils/guidelines.js +1 -1
- package/dist/types/commands/misc.d.ts +2 -1
- package/dist/types/nodeviews/TableComponent.d.ts +7 -2
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +27 -0
- package/dist/types/nodeviews/TableContainer.d.ts +4 -2
- package/dist/types/nodeviews/TableResizer.d.ts +4 -1
- package/dist/types/nodeviews/types.d.ts +1 -0
- package/dist/types/plugin.d.ts +11 -7
- package/dist/types/types.d.ts +13 -4
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +113 -1
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +3 -2
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +223 -0
- package/dist/types/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
- package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
- package/dist/types/ui/TableFloatingControls/index.d.ts +113 -1
- package/dist/types/ui/common-styles.d.ts +3 -0
- package/dist/types-ts4.5/commands/misc.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +7 -2
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +27 -0
- package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +4 -2
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +4 -1
- package/dist/types-ts4.5/nodeviews/types.d.ts +1 -0
- package/dist/types-ts4.5/plugin.d.ts +11 -7
- package/dist/types-ts4.5/types.d.ts +13 -4
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +144 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +285 -0
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +144 -1
- package/dist/types-ts4.5/ui/common-styles.d.ts +3 -0
- package/package.json +6 -6
- package/src/commands/misc.ts +6 -3
- package/src/nodeviews/TableComponent.tsx +36 -7
- package/src/nodeviews/TableComponentWithSharedState.tsx +125 -0
- package/src/nodeviews/TableContainer.tsx +24 -3
- package/src/nodeviews/TableResizer.tsx +36 -21
- package/src/nodeviews/table.tsx +22 -1
- package/src/nodeviews/types.ts +1 -0
- package/src/plugin.tsx +47 -6
- package/src/toolbar.tsx +20 -19
- package/src/types.ts +33 -4
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +66 -112
- package/src/ui/FloatingDragMenu/DragMenu.tsx +3 -12
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +19 -28
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +10 -2
- package/src/ui/TableFloatingColumnControls/index.tsx +13 -1
- package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +58 -0
- package/src/ui/TableFloatingControls/CornerControls/index.tsx +4 -1
- package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +68 -0
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +4 -1
- package/src/ui/TableFloatingControls/index.tsx +42 -8
- package/src/ui/common-styles.ts +611 -610
- package/src/utils/guidelines.ts +5 -4
|
@@ -80,11 +80,11 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
80
80
|
var node = isOpen && targetCellPosition ? state.doc.nodeAt(targetCellPosition) : null;
|
|
81
81
|
var background = hexToEditorBackgroundPaletteColor((node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff');
|
|
82
82
|
return {
|
|
83
|
-
content: isDragAndDropEnabled
|
|
83
|
+
content: isDragAndDropEnabled ? formatMessage(messages.backgroundColor) : formatMessage(messages.cellBackground),
|
|
84
84
|
value: {
|
|
85
85
|
name: 'background'
|
|
86
86
|
},
|
|
87
|
-
elemBefore: isDragAndDropEnabled
|
|
87
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
88
88
|
css: elementBeforeIconStyles
|
|
89
89
|
}, jsx(EditorBackgroundColorIcon, {
|
|
90
90
|
label: formatMessage(messages.backgroundColor),
|
|
@@ -94,7 +94,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
94
94
|
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
95
95
|
}, jsx("div", {
|
|
96
96
|
css: cellColourPreviewStyles(background),
|
|
97
|
-
className: isDragAndDropEnabled
|
|
97
|
+
className: isDragAndDropEnabled ? ClassName.CONTEXTUAL_MENU_ICON_SMALL : ClassName.CONTEXTUAL_MENU_ICON
|
|
98
98
|
}), isSubmenuOpen && jsx("div", {
|
|
99
99
|
className: ClassName.CONTEXTUAL_SUBMENU,
|
|
100
100
|
ref: _this.handleSubMenuRef
|
|
@@ -126,7 +126,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
126
126
|
name: 'merge'
|
|
127
127
|
},
|
|
128
128
|
isDisabled: !canMergeCells(state.tr),
|
|
129
|
-
elemBefore: isDragAndDropEnabled
|
|
129
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
130
130
|
css: elementBeforeIconStyles
|
|
131
131
|
}, jsx(MergeCellsIcon, null)) : undefined
|
|
132
132
|
}, {
|
|
@@ -135,7 +135,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
135
135
|
name: 'split'
|
|
136
136
|
},
|
|
137
137
|
isDisabled: !splitCell(state),
|
|
138
|
-
elemBefore: isDragAndDropEnabled
|
|
138
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
139
139
|
css: elementBeforeIconStyles
|
|
140
140
|
}, jsx(SplitCellIcon, null)) : undefined
|
|
141
141
|
}];
|
|
@@ -149,14 +149,14 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
149
149
|
var _getPluginState3 = getPluginState(editorView.state),
|
|
150
150
|
isDragAndDropEnabled = _getPluginState3.isDragAndDropEnabled;
|
|
151
151
|
return {
|
|
152
|
-
content: formatMessage(isDragAndDropEnabled
|
|
152
|
+
content: formatMessage(isDragAndDropEnabled ? messages.addColumnRight : messages.insertColumn),
|
|
153
153
|
value: {
|
|
154
154
|
name: 'insert_column'
|
|
155
155
|
},
|
|
156
156
|
elemAfter: jsx("div", {
|
|
157
157
|
css: shortcutStyle
|
|
158
158
|
}, tooltip(addColumnAfter)),
|
|
159
|
-
elemBefore: isDragAndDropEnabled
|
|
159
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
160
160
|
css: elementBeforeIconStyles
|
|
161
161
|
}, jsx(AddColRightIcon, null)) : undefined
|
|
162
162
|
};
|
|
@@ -168,14 +168,14 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
168
168
|
var _getPluginState4 = getPluginState(editorView.state),
|
|
169
169
|
isDragAndDropEnabled = _getPluginState4.isDragAndDropEnabled;
|
|
170
170
|
return {
|
|
171
|
-
content: formatMessage(isDragAndDropEnabled
|
|
171
|
+
content: formatMessage(isDragAndDropEnabled ? messages.addRowBelow : messages.insertRow),
|
|
172
172
|
value: {
|
|
173
173
|
name: 'insert_row'
|
|
174
174
|
},
|
|
175
175
|
elemAfter: jsx("div", {
|
|
176
176
|
css: shortcutStyle
|
|
177
177
|
}, tooltip(addRowAfter)),
|
|
178
|
-
elemBefore: isDragAndDropEnabled
|
|
178
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
179
179
|
css: elementBeforeIconStyles
|
|
180
180
|
}, jsx(AddRowBelowIcon, null)) : undefined
|
|
181
181
|
};
|
|
@@ -203,7 +203,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
203
203
|
elemAfter: jsx("div", {
|
|
204
204
|
css: shortcutStyle
|
|
205
205
|
}, tooltip(backspace)),
|
|
206
|
-
elemBefore: isDragAndDropEnabled
|
|
206
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
207
207
|
css: elementBeforeIconStyles
|
|
208
208
|
}, jsx(CrossCircleIcon, {
|
|
209
209
|
label: formatMessage(messages.clearCells, {
|
|
@@ -229,7 +229,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
229
229
|
value: {
|
|
230
230
|
name: 'delete_column'
|
|
231
231
|
},
|
|
232
|
-
elemBefore: isDragAndDropEnabled
|
|
232
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
233
233
|
css: elementBeforeIconStyles
|
|
234
234
|
}, jsx(RemoveIcon, {
|
|
235
235
|
label: formatMessage(messages.removeColumns, {
|
|
@@ -255,7 +255,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
255
255
|
value: {
|
|
256
256
|
name: 'delete_row'
|
|
257
257
|
},
|
|
258
|
-
elemBefore: isDragAndDropEnabled
|
|
258
|
+
elemBefore: isDragAndDropEnabled ? jsx("span", {
|
|
259
259
|
css: elementBeforeIconStyles
|
|
260
260
|
}, jsx(RemoveIcon, {
|
|
261
261
|
label: formatMessage(messages.removeRows, {
|
|
@@ -273,7 +273,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
273
273
|
var _getPluginState8 = getPluginState(editorView.state),
|
|
274
274
|
isDragAndDropEnabled = _getPluginState8.isDragAndDropEnabled,
|
|
275
275
|
allowDistributeColumns = _getPluginState8.pluginConfig.allowDistributeColumns;
|
|
276
|
-
if (allowDistributeColumns &&
|
|
276
|
+
if (allowDistributeColumns && !isDragAndDropEnabled) {
|
|
277
277
|
var _newResizeState$chang;
|
|
278
278
|
var _getPluginState9 = getPluginState(editorView.state),
|
|
279
279
|
_getPluginState9$isTa = _getPluginState9.isTableScalingEnabled,
|
|
@@ -297,7 +297,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
297
297
|
allowColumnSorting = _this$props9.allowColumnSorting;
|
|
298
298
|
var _getPluginState10 = getPluginState(editorView.state),
|
|
299
299
|
isDragAndDropEnabled = _getPluginState10.isDragAndDropEnabled;
|
|
300
|
-
if (allowColumnSorting &&
|
|
300
|
+
if (allowColumnSorting && !isDragAndDropEnabled) {
|
|
301
301
|
var hasMergedCellsInTable = getMergedCellsPositions(editorView.state.tr).length > 0;
|
|
302
302
|
var warning = hasMergedCellsInTable ? {
|
|
303
303
|
tooltipDescription: formatMessage(messages.canNotSortTable),
|
|
@@ -515,7 +515,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
515
515
|
editorView = _this$props14.editorView;
|
|
516
516
|
var _getPluginState14 = getPluginState(editorView.state),
|
|
517
517
|
isDragAndDropEnabled = _getPluginState14.isDragAndDropEnabled;
|
|
518
|
-
var items = isDragAndDropEnabled
|
|
518
|
+
var items = isDragAndDropEnabled ? this.createNewContextMenuItems() : this.createOriginalContextMenuItems();
|
|
519
519
|
return jsx("div", {
|
|
520
520
|
"data-testid": "table-cell-contextual-menu",
|
|
521
521
|
onMouseLeave: this.closeSubmenu
|
|
@@ -538,7 +538,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
538
538
|
fitWidth: isDragAndDropEnabled ? contextualMenuDropdownWidthDnD : contextualMenuDropdownWidth,
|
|
539
539
|
boundariesElement: boundariesElement,
|
|
540
540
|
offset: offset,
|
|
541
|
-
section: isDragAndDropEnabled && getBooleanFF('platform.editor.
|
|
541
|
+
section: isDragAndDropEnabled && getBooleanFF('platform.editor.menu.group-items') ? {
|
|
542
542
|
hasSeparator: true
|
|
543
543
|
} : undefined
|
|
544
544
|
}));
|
|
@@ -437,20 +437,20 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
437
437
|
if (!menuItems) {
|
|
438
438
|
return null;
|
|
439
439
|
}
|
|
440
|
-
if (allowBackgroundColor
|
|
440
|
+
if (allowBackgroundColor) {
|
|
441
441
|
menuItems[0].items.unshift(createBackgroundColorMenuItem());
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
// If first row, add toggle for Header row, default is true
|
|
445
445
|
// If first column, add toggle for Header column, default is false
|
|
446
|
-
if (
|
|
446
|
+
if (index === 0) {
|
|
447
447
|
menuItems.push({
|
|
448
448
|
items: [createHeaderRowColumnMenuItem(direction)]
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
// All rows, add toggle for numbered rows, default is false
|
|
453
|
-
if (
|
|
453
|
+
if (direction === 'row') {
|
|
454
454
|
index === 0 ? menuItems[menuItems.length - 1].items.push(createRowNumbersMenuItem()) : menuItems.push({
|
|
455
455
|
items: [createRowNumbersMenuItem()]
|
|
456
456
|
});
|
|
@@ -6,7 +6,6 @@ import { ArrowKeyNavigationProvider, ArrowKeyNavigationType, DropdownMenuItem }
|
|
|
6
6
|
import { withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
7
7
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { MenuGroup, Section } from '@atlaskit/menu';
|
|
9
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { dragMenuDropdownWidth } from '../consts';
|
|
11
10
|
var DropListWithOutsideListeners = withReactEditorViewOuterListeners(DropList);
|
|
12
11
|
export var DropdownMenu = function DropdownMenu(_ref) {
|
|
@@ -118,39 +117,33 @@ export var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
118
117
|
// The logic below normalises the index value based on the number
|
|
119
118
|
// of menu items with 2 focusable elements, and adjusts the index to ensure
|
|
120
119
|
// the correct menu item is sent in onItemActivated callback
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
var keys = ['row_numbers', 'header_row', 'header_column'];
|
|
121
|
+
var doubleItemCount = 0;
|
|
122
|
+
var firstIndex = results.findIndex(function (value) {
|
|
123
|
+
return keys.includes(value.key);
|
|
124
|
+
});
|
|
125
|
+
if (firstIndex === -1 || index <= firstIndex) {
|
|
126
|
+
onItemActivated && onItemActivated({
|
|
127
|
+
item: results[index]
|
|
126
128
|
});
|
|
127
|
-
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
for (var i = firstIndex; i < results.length; i += 1) {
|
|
132
|
+
if (keys.includes(results[i].key)) {
|
|
133
|
+
doubleItemCount += 1;
|
|
134
|
+
}
|
|
135
|
+
if (firstIndex % 2 === 0 && index - doubleItemCount === i) {
|
|
128
136
|
onItemActivated && onItemActivated({
|
|
129
|
-
item: results[
|
|
137
|
+
item: results[i]
|
|
130
138
|
});
|
|
131
139
|
return;
|
|
132
140
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
onItemActivated && onItemActivated({
|
|
139
|
-
item: results[i]
|
|
140
|
-
});
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (firstIndex % 2 === 1 && index - doubleItemCount === i) {
|
|
144
|
-
onItemActivated && onItemActivated({
|
|
145
|
-
item: results[i]
|
|
146
|
-
});
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
141
|
+
if (firstIndex % 2 === 1 && index - doubleItemCount === i) {
|
|
142
|
+
onItemActivated && onItemActivated({
|
|
143
|
+
item: results[i]
|
|
144
|
+
});
|
|
145
|
+
return;
|
|
149
146
|
}
|
|
150
|
-
} else {
|
|
151
|
-
onItemActivated && onItemActivated({
|
|
152
|
-
item: results[index]
|
|
153
|
-
});
|
|
154
147
|
}
|
|
155
148
|
}
|
|
156
149
|
}, innerMenu())));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useMemo, useRef } from 'react';
|
|
4
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
4
5
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
5
6
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
6
7
|
import { CellSelection } from '@atlaskit/editor-tables';
|
|
@@ -36,8 +37,11 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
36
37
|
tableContainerWidth = _ref.tableContainerWidth,
|
|
37
38
|
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
38
39
|
isDragging = _ref.isDragging,
|
|
39
|
-
getScrollOffset = _ref.getScrollOffset
|
|
40
|
+
getScrollOffset = _ref.getScrollOffset,
|
|
41
|
+
api = _ref.api;
|
|
40
42
|
var columnControlsRef = useRef(null);
|
|
43
|
+
var _useSharedPluginState = useSharedPluginState(api, ['selection']),
|
|
44
|
+
selectionState = _useSharedPluginState.selectionState;
|
|
41
45
|
var widths = (_colWidths$map$join = colWidths === null || colWidths === void 0 ? void 0 : colWidths.map(function (width) {
|
|
42
46
|
return (
|
|
43
47
|
// when there is sticky header, a `margin-right: -1px` applied to `tr.sticky th` so it causes colWidths to be 1px wider
|
|
@@ -48,7 +52,7 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
48
52
|
// TODO: reusing getRowsParams here because it's generic enough to work for columns -> rename
|
|
49
53
|
var columnParams = getRowsParams(colWidths !== null && colWidths !== void 0 ? colWidths : []);
|
|
50
54
|
var colIndex = hoveredCell === null || hoveredCell === void 0 ? void 0 : hoveredCell.colIndex;
|
|
51
|
-
var selectedColIndexes = getSelectedColumns(editorView.state.selection);
|
|
55
|
+
var selectedColIndexes = getSelectedColumns((selectionState === null || selectionState === void 0 ? void 0 : selectionState.selection) || editorView.state.selection);
|
|
52
56
|
var firstRow = tableRef.querySelector('tr');
|
|
53
57
|
var hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
54
58
|
var marginTop = hasHeaderRow && stickyTop !== undefined ? (_rowHeights$ = rowHeights === null || rowHeights === void 0 ? void 0 : rowHeights[0]) !== null && _rowHeights$ !== void 0 ? _rowHeights$ : 0 : 0;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
4
5
|
import { TableCssClassName as ClassName } from '../../types';
|
|
5
6
|
import { containsHeaderColumn, getColumnsWidths, getRowHeights } from '../../utils';
|
|
@@ -20,7 +21,8 @@ export var TableFloatingColumnControls = function TableFloatingColumnControls(_r
|
|
|
20
21
|
tableContainerWidth = _ref.tableContainerWidth,
|
|
21
22
|
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
22
23
|
getScrollOffset = _ref.getScrollOffset,
|
|
23
|
-
tableWrapperHeight = _ref.tableWrapperHeight
|
|
24
|
+
tableWrapperHeight = _ref.tableWrapperHeight,
|
|
25
|
+
api = _ref.api;
|
|
24
26
|
var _useState = useState(false),
|
|
25
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
28
|
isDragging = _useState2[0],
|
|
@@ -87,7 +89,8 @@ export var TableFloatingColumnControls = function TableFloatingColumnControls(_r
|
|
|
87
89
|
tableContainerWidth: tableContainerWidth,
|
|
88
90
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
89
91
|
isDragging: isDragging,
|
|
90
|
-
getScrollOffset: getScrollOffset
|
|
92
|
+
getScrollOffset: getScrollOffset,
|
|
93
|
+
api: getBooleanFF('platform.editor.table.use-shared-state-hook') ? api : undefined
|
|
91
94
|
}), isDragging && /*#__PURE__*/React.createElement(ColumnDropTargets, {
|
|
92
95
|
tableRef: tableRef,
|
|
93
96
|
isHeaderSticky: (stickyHeader === null || stickyHeader === void 0 ? void 0 : stickyHeader.sticky) && hasHeaderRow,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { injectIntl } from 'react-intl-next';
|
|
4
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
4
5
|
import { tableMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
6
|
import { findTable, isTableSelected, selectTable } from '@atlaskit/editor-tables/utils';
|
|
6
7
|
import { clearHoverSelection } from '../../../commands';
|
|
@@ -45,4 +46,50 @@ var DragCornerControlsComponent = function DragCornerControlsComponent(_ref) {
|
|
|
45
46
|
className: ClassName.DRAG_CORNER_BUTTON_INNER
|
|
46
47
|
}));
|
|
47
48
|
};
|
|
49
|
+
var DragCornerControlsComponentWithSelection = function DragCornerControlsComponentWithSelection(_ref2) {
|
|
50
|
+
var editorView = _ref2.editorView,
|
|
51
|
+
isInDanger = _ref2.isInDanger,
|
|
52
|
+
isResizing = _ref2.isResizing,
|
|
53
|
+
formatMessage = _ref2.intl.formatMessage,
|
|
54
|
+
api = _ref2.api;
|
|
55
|
+
var _useSharedPluginState = useSharedPluginState(api, ['selection']),
|
|
56
|
+
selectionState = _useSharedPluginState.selectionState;
|
|
57
|
+
var handleOnClick = function handleOnClick() {
|
|
58
|
+
var state = editorView.state,
|
|
59
|
+
dispatch = editorView.dispatch;
|
|
60
|
+
dispatch(selectTable(state.tr).setMeta('addToHistory', false));
|
|
61
|
+
};
|
|
62
|
+
var handleMouseOut = function handleMouseOut() {
|
|
63
|
+
var state = editorView.state,
|
|
64
|
+
dispatch = editorView.dispatch;
|
|
65
|
+
clearHoverSelection()(state, dispatch);
|
|
66
|
+
};
|
|
67
|
+
var isActive = useMemo(function () {
|
|
68
|
+
if (!(selectionState !== null && selectionState !== void 0 && selectionState.selection)) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
var table = findTable(selectionState.selection);
|
|
72
|
+
if (!table) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return isTableSelected(selectionState.selection);
|
|
76
|
+
}, [selectionState]);
|
|
77
|
+
if (isResizing) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
81
|
+
className: classnames(ClassName.DRAG_CORNER_BUTTON, {
|
|
82
|
+
active: isActive,
|
|
83
|
+
danger: isActive && isInDanger
|
|
84
|
+
}),
|
|
85
|
+
"aria-label": formatMessage(messages.cornerControl),
|
|
86
|
+
type: "button",
|
|
87
|
+
onClick: handleOnClick,
|
|
88
|
+
onMouseOut: handleMouseOut,
|
|
89
|
+
contentEditable: false
|
|
90
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
className: ClassName.DRAG_CORNER_BUTTON_INNER
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
export var DragCornerControlsWithSelection = injectIntl(DragCornerControlsComponentWithSelection);
|
|
48
95
|
export var DragCornerControls = injectIntl(DragCornerControlsComponent);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { CornerControls } from './ClassicCornerControls';
|
|
2
|
-
export { DragCornerControls } from './DragCornerControls';
|
|
2
|
+
export { DragCornerControls, DragCornerControlsWithSelection } from './DragCornerControls';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { CornerControls } from './CornerControls';
|
|
4
|
+
import { RowControls } from './RowControls';
|
|
5
|
+
export var FloatingControlsWithSelection = function FloatingControlsWithSelection(_ref) {
|
|
6
|
+
var editorView = _ref.editorView,
|
|
7
|
+
tableRef = _ref.tableRef,
|
|
8
|
+
isInDanger = _ref.isInDanger,
|
|
9
|
+
isResizing = _ref.isResizing,
|
|
10
|
+
isHeaderRowEnabled = _ref.isHeaderRowEnabled,
|
|
11
|
+
isHeaderColumnEnabled = _ref.isHeaderColumnEnabled,
|
|
12
|
+
hoveredRows = _ref.hoveredRows,
|
|
13
|
+
stickyTop = _ref.stickyTop,
|
|
14
|
+
hoverRows = _ref.hoverRows,
|
|
15
|
+
selectRow = _ref.selectRow,
|
|
16
|
+
tableActive = _ref.tableActive,
|
|
17
|
+
api = _ref.api;
|
|
18
|
+
var _useSharedPluginState = useSharedPluginState(api, ['selection']),
|
|
19
|
+
selectionState = _useSharedPluginState.selectionState;
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
|
|
21
|
+
editorView: editorView,
|
|
22
|
+
tableRef: tableRef,
|
|
23
|
+
isInDanger: isInDanger,
|
|
24
|
+
isResizing: isResizing,
|
|
25
|
+
isHeaderRowEnabled: isHeaderRowEnabled,
|
|
26
|
+
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
27
|
+
hoveredRows: hoveredRows,
|
|
28
|
+
stickyTop: tableActive ? stickyTop : undefined
|
|
29
|
+
}), /*#__PURE__*/React.createElement(RowControls, {
|
|
30
|
+
selection: selectionState === null || selectionState === void 0 ? void 0 : selectionState.selection,
|
|
31
|
+
editorView: editorView,
|
|
32
|
+
tableRef: tableRef,
|
|
33
|
+
hoverRows: hoverRows,
|
|
34
|
+
hoveredRows: hoveredRows,
|
|
35
|
+
isInDanger: isInDanger,
|
|
36
|
+
isResizing: isResizing,
|
|
37
|
+
selectRow: selectRow,
|
|
38
|
+
stickyTop: tableActive ? stickyTop : undefined
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
@@ -42,7 +42,8 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
|
42
42
|
hoveredRows = _this$props.hoveredRows,
|
|
43
43
|
isInDanger = _this$props.isInDanger,
|
|
44
44
|
isResizing = _this$props.isResizing,
|
|
45
|
-
formatMessage = _this$props.intl.formatMessage
|
|
45
|
+
formatMessage = _this$props.intl.formatMessage,
|
|
46
|
+
selectionState = _this$props.selection;
|
|
46
47
|
if (!tableRef) {
|
|
47
48
|
return null;
|
|
48
49
|
}
|
|
@@ -66,7 +67,7 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
|
66
67
|
}
|
|
67
68
|
var thisRowSticky = _this2.props.stickyTop !== undefined && index === 0 && hasHeaderRow;
|
|
68
69
|
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "".concat(ClassName.ROW_CONTROLS_BUTTON_WRAP, " ").concat(getRowClassNames(startIndex, selection, hoveredRows, isInDanger, isResizing), " ").concat(thisRowSticky ? 'sticky' : ''),
|
|
70
|
+
className: "".concat(ClassName.ROW_CONTROLS_BUTTON_WRAP, " ").concat(getRowClassNames(startIndex, selectionState || selection, hoveredRows, isInDanger, isResizing), " ").concat(thisRowSticky ? 'sticky' : ''),
|
|
70
71
|
key: startIndex,
|
|
71
72
|
style: {
|
|
72
73
|
height: height,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { hoverCell, hoverRows, selectRow, selectRows } from '../../commands';
|
|
4
5
|
import { TableCssClassName as ClassName } from '../../types';
|
|
5
|
-
import { CornerControls, DragCornerControls } from './CornerControls';
|
|
6
|
+
import { CornerControls, DragCornerControls, DragCornerControlsWithSelection } from './CornerControls';
|
|
7
|
+
import { FloatingControlsWithSelection } from './FloatingControlsWithSelection';
|
|
6
8
|
import NumberColumn from './NumberColumn';
|
|
7
9
|
import { DragControls, RowControls } from './RowControls';
|
|
8
10
|
export var TableFloatingControls = function TableFloatingControls(_ref) {
|
|
@@ -21,7 +23,8 @@ export var TableFloatingControls = function TableFloatingControls(_ref) {
|
|
|
21
23
|
isDragAndDropEnabled = _ref.isDragAndDropEnabled,
|
|
22
24
|
hoveredCell = _ref.hoveredCell,
|
|
23
25
|
isTableHovered = _ref.isTableHovered,
|
|
24
|
-
tableWrapperWidth = _ref.tableWrapperWidth
|
|
26
|
+
tableWrapperWidth = _ref.tableWrapperWidth,
|
|
27
|
+
api = _ref.api;
|
|
25
28
|
var _selectRow = useCallback(function (row, expand) {
|
|
26
29
|
var state = editorView.state,
|
|
27
30
|
dispatch = editorView.dispatch;
|
|
@@ -82,7 +85,13 @@ export var TableFloatingControls = function TableFloatingControls(_ref) {
|
|
|
82
85
|
updateCellHoverLocation: updateCellHoverLocation,
|
|
83
86
|
stickyTop: stickyTop,
|
|
84
87
|
isDragAndDropEnabled: isDragAndDropEnabled
|
|
85
|
-
}) : null, tableActive && /*#__PURE__*/React.createElement(React.Fragment, null, isDragAndDropEnabled ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
88
|
+
}) : null, tableActive && /*#__PURE__*/React.createElement(React.Fragment, null, isDragAndDropEnabled ? /*#__PURE__*/React.createElement(React.Fragment, null, getBooleanFF('platform.editor.table.use-shared-state-hook') ? /*#__PURE__*/React.createElement(DragCornerControlsWithSelection, {
|
|
89
|
+
editorView: editorView,
|
|
90
|
+
tableRef: tableRef,
|
|
91
|
+
isInDanger: isInDanger,
|
|
92
|
+
isResizing: isResizing,
|
|
93
|
+
api: api
|
|
94
|
+
}) : /*#__PURE__*/React.createElement(DragCornerControls, {
|
|
86
95
|
editorView: editorView,
|
|
87
96
|
tableRef: tableRef,
|
|
88
97
|
isInDanger: isInDanger,
|
|
@@ -101,7 +110,20 @@ export var TableFloatingControls = function TableFloatingControls(_ref) {
|
|
|
101
110
|
selectRow: _selectRow,
|
|
102
111
|
selectRows: _selectRows,
|
|
103
112
|
updateCellHoverLocation: updateCellHoverLocation
|
|
104
|
-
})) :
|
|
113
|
+
})) : getBooleanFF('platform.editor.table.use-shared-state-hook') ? /*#__PURE__*/React.createElement(FloatingControlsWithSelection, {
|
|
114
|
+
editorView: editorView,
|
|
115
|
+
tableRef: tableRef,
|
|
116
|
+
isInDanger: isInDanger,
|
|
117
|
+
isResizing: isResizing,
|
|
118
|
+
isHeaderRowEnabled: isHeaderRowEnabled,
|
|
119
|
+
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
120
|
+
hoveredRows: hoveredRows,
|
|
121
|
+
stickyTop: tableActive ? stickyTop : undefined,
|
|
122
|
+
tableActive: tableActive,
|
|
123
|
+
hoverRows: _hoverRows,
|
|
124
|
+
selectRow: _selectRow,
|
|
125
|
+
api: api
|
|
126
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
|
|
105
127
|
editorView: editorView,
|
|
106
128
|
tableRef: tableRef,
|
|
107
129
|
isInDanger: isInDanger,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
@@ -65,10 +65,15 @@ var tableWrapperStyles = function tableWrapperStyles() {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
+
// re-exporting these styles to use in Gemini test when table node view is rendered outside of PM
|
|
69
|
+
export var baseTableStyles = function baseTableStyles(props) {
|
|
70
|
+
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4;
|
|
71
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n ", "\n\n ", "\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n ", "\n\n ", "\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n /* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky .", ", tr.sticky .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", ",\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n .", ", .", " {\n width: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n .", " {\n display: grid;\n align-items: center;\n position: absolute;\n z-index: ", ";\n\n .", " {\n position: absolute;\n align-self: end;\n height: 100%;\n width: 18px;\n }\n\n .", " {\n position: absolute;\n bottom: -3px;\n left: 2px;\n background-color: ", ";\n height: 4px;\n width: 4px;\n border-radius: 50%;\n pointer-events: none;\n }\n }\n\n .", " {\n .", " {\n height: 24px;\n position: absolute;\n top: ", ";\n z-index: ", ";\n }\n\n .", " {\n position: absolute;\n height: 24px;\n width: 100%;\n }\n\n .", " {\n background-color: ", ";\n height: 4px;\n width: 4px;\n border-radius: 50%;\n position: absolute;\n right: -2px;\n }\n }\n\n .", " {\n background: none;\n border: none;\n outline: none;\n position: absolute;\n margin: 0;\n padding: 0;\n display: flex;\n align-items: center;\n cursor: pointer;\n\n :focus {\n outline: none;\n }\n }\n\n .", " {\n cursor: grab;\n pointer-events: auto;\n\n line-height: 0;\n padding: 0;\n border-radius: 6px;\n width: max-content;\n border: 2px solid ", ";\n\n display: flex;\n justify-content: center;\n align-items: center;\n background: transparent;\n outline: none;\n\n &.placeholder {\n background-color: transparent;\n border: 2px solid transparent;\n }\n\n &.", " {\n cursor: pointer;\n & svg {\n & > rect.", " {\n fill: ", ";\n }\n & > rect {\n fill: ", ";\n }\n & > g > rect {\n fill: ", ";\n }\n }\n }\n\n &:not(.", ") {\n & svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n\n &:hover {\n svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n }\n\n &:active {\n cursor: grabbing;\n }\n\n &.selected {\n :focus {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n &:active {\n outline: none;\n }\n\n svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n }\n\n &.danger {\n svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n }\n }\n }\n\n ", "\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n // add a background above the first numbered column cell when sticky header is engaged\n // which hides the table when scrolling\n .", " {\n .", ":first-of-type::after {\n content: '';\n display: block;\n height: 33px;\n width: 100%;\n background-color: ", ";\n position: absolute;\n\n // the extra pixel is accounting for borders\n top: -34px;\n left: -1px;\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: ", "px;\n\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", ":not(.", ") {\n cursor: pointer;\n }\n .", ":not(.", "):hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n /* ED-19064: To fix when enable header column in the table,\n and selection the header column, the right border is not tableBorderSelectedColor\n when deleting the header column, the right border is not tableToolbarDeleteColor */\n td.", ",\n td.", ",\n th.", ".", ",\n th.", ".", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n ", ";\n z-index: ", ";\n }\n\n &.", ".", "::after {\n ", ";\n z-index: ", ";\n }\n }\n }\n\n // override for DnD controls\n .", " {\n position: absolute;\n margin-top: ", "px;\n left: -", "px;\n z-index: ", ";\n }\n\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n left: -", "px;\n }\n\n .", ".", ",\n .", ".", " {\n z-index: ", ";\n }\n\n .", " {\n position: absolute;\n top: ", "px;\n }\n\n .", " .", " {\n position: fixed;\n /* higher zIndex than sticky header which is akEditorTableCellOnStickyHeaderZIndex - 5 */\n z-index: ", ";\n }\n\n ", "\n"])), tableSharedStyle(), columnControlsLineMarker(), hoveredDeleteButton(), hoveredCell(), hoveredWarningCell, ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableDragAndDrop) && insertLine(), resizeHandle((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.tableDragAndDrop), rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor, tableBorderColor, tableBorderColor, ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper(), ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper(), dragInsertButtonWrapper(), dragCornerControlButton(), DeleteButton(), ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, "var(--ds-surface, white)", ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, "var(--ds-surface, white)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(), tableStickyHeaderFirefoxFixStyle(), ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, "var(--ds-surface, white)", tableToolbarSize, ClassName.TABLE_STICKY, "var(--ds-surface, green)", stickyRowOffsetTop, akEditorTableCellOnStickyHeaderZIndex - 5, "var(--ds-surface, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, akEditorTableCellOnStickyHeaderZIndex, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, "var(--ds-surface, white)", sentinelStyles, OverflowShadow((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.tableDragAndDrop), stickyScrollbarStyles(props.featureFlags), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, tableOverflowShadowWidth, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), columnControlsDecoration(), rowControlsWrapperDotStyle(), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker("\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor, tableBorderRadiusSize, tableHeaderCellBackgroundColor, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1 : akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker("\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton("\n border-bottom: 1px solid ".concat(tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.DRAG_ROW_CONTROLS, akEditorUnitZIndex, ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, ClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #C1C7D0)", ClassName.DRAG_COLUMN_CONTROLS, ClassName.DRAG_COLUMN_CONTROLS_INNER, "var(--ds-space-negative-150, -12px)", resizeHandlerZIndex, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #C1C7D0)", ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, ClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, ".concat(N0, ")"), ClassName.DRAG_HANDLE_DISABLED, ClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DCDFE4)", "var(--ds-background-accent-gray-subtlest, #F4F5F7)", "var(--ds-icon-disabled, #BFDBF847)", ClassName.DRAG_HANDLE_DISABLED, "var(--ds-background-accent-gray-subtler, #DCDFE4)", "var(--ds-icon-subtle, #626f86)", "var(--ds-background-accent-blue-subtle, #579DFF)", "var(--ds-icon-inverse, #FFF)", "var(--ds-border-focused, #2684FF)", "var(--ds-background-accent-blue-subtle, #579dff)", "var(--ds-icon-inverse, #fff)", "var(--ds-background-accent-red-subtler-pressed, #F87462)", "var(--ds-border-inverse, #FFF)", floatingColumnControls(), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize : akEditorTableToolbarSize - 1, (_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.tableDragAndDrop ? 0 : akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, relativeFontSizeToBase16(fontSize()), tableHeaderCellBackgroundColor, tableTextColor, tableBorderColor, tableBorderColor, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, white)", ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? 0 : 1, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, "var(--ds-text-danger, ".concat(R500, ")"), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, ClassName.HOVERED_NO_HIGHLIGHT, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, ClassName.DRAG_ROW_CONTROLS_WRAPPER, tableMarginTop, tableToolbarSize + 1, rowControlsZIndex + 4, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, tableToolbarSize, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tableMarginTop, ClassName.TABLE_STICKY, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, akEditorTableCellOnStickyHeaderZIndex - 4, tableWrapperStyles());
|
|
72
|
+
};
|
|
73
|
+
|
|
68
74
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4139
|
|
69
75
|
export var tableStyles = function tableStyles(props) {
|
|
70
|
-
var
|
|
71
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n ", "\n\n ", "\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n ", "\n\n ", "\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n /* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", ",\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n .", ", .", " {\n width: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n .", " {\n display: grid;\n align-items: center;\n position: absolute;\n z-index: ", ";\n\n .", " {\n position: absolute;\n align-self: end;\n height: 100%;\n width: 18px;\n }\n\n .", " {\n position: absolute;\n bottom: -3px;\n left: 2px;\n background-color: ", ";\n height: 4px;\n width: 4px;\n border-radius: 50%;\n pointer-events: none;\n }\n }\n\n .", " {\n .", " {\n height: 24px;\n position: absolute;\n top: ", ";\n z-index: ", ";\n }\n\n .", " {\n position: absolute;\n height: 24px;\n width: 100%;\n }\n\n .", " {\n background-color: ", ";\n height: 4px;\n width: 4px;\n border-radius: 50%;\n position: absolute;\n right: -2px;\n }\n }\n\n .", " {\n background: none;\n border: none;\n outline: none;\n position: absolute;\n margin: 0;\n padding: 0;\n display: flex;\n align-items: center;\n cursor: pointer;\n\n :focus {\n outline: none;\n }\n }\n\n .", " {\n cursor: grab;\n pointer-events: auto;\n\n line-height: 0;\n padding: 0;\n border-radius: 6px;\n width: max-content;\n border: 2px solid ", ";\n\n display: flex;\n justify-content: center;\n align-items: center;\n background: transparent;\n outline: none;\n\n &.placeholder {\n background-color: transparent;\n border: 2px solid transparent;\n }\n\n &.", " {\n cursor: pointer;\n & svg {\n & > rect.", " {\n fill: ", ";\n }\n & > rect {\n fill: ", ";\n }\n & > g > rect {\n fill: ", ";\n }\n }\n }\n\n &:not(.", ") {\n & svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n\n &:hover {\n svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n }\n\n &:active {\n cursor: grabbing;\n }\n\n &.selected {\n :focus {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n &:active {\n outline: none;\n }\n\n svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n }\n\n &.danger {\n svg {\n rect {\n fill: ", ";\n }\n g {\n fill: ", ";\n }\n }\n }\n }\n }\n\n ", "\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n // add a background above the first numbered column cell when sticky header is engaged\n // which hides the table when scrolling\n .", " {\n .", ":first-of-type::after {\n content: '';\n display: block;\n height: 33px;\n width: 100%;\n background-color: ", ";\n position: absolute;\n\n // the extra pixel is accounting for borders\n top: -34px;\n left: -1px;\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: ", "px;\n\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", ":not(.", ") {\n cursor: pointer;\n }\n .", ":not(.", "):hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n /* ED-19064: To fix when enable header column in the table,\n and selection the header column, the right border is not tableBorderSelectedColor\n when deleting the header column, the right border is not tableToolbarDeleteColor */\n td.", ",\n td.", ",\n th.", ".", ",\n th.", ".", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n ", ";\n z-index: ", ";\n }\n\n &.", ".", "::after {\n ", ";\n z-index: ", ";\n }\n }\n }\n\n // override for DnD controls\n .", " {\n position: absolute;\n margin-top: ", "px;\n left: -", "px;\n z-index: ", ";\n }\n\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n left: -", "px;\n }\n\n .", ".", ",\n .", ".", " {\n z-index: ", ";\n }\n\n .", " {\n position: absolute;\n top: ", "px;\n }\n\n .", " .", " {\n position: fixed;\n /* higher zIndex than sticky header which is akEditorTableCellOnStickyHeaderZIndex - 5 */\n z-index: ", ";\n }\n\n ", "\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n ", "\n"])), ClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(N20A, ")"), "var(--ds-icon, ".concat(N300, ")"), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(B300, ")"), "var(--ds-icon, white)", tableSharedStyle(), columnControlsLineMarker(), hoveredDeleteButton(), hoveredCell(), hoveredWarningCell, ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableDragAndDrop) && insertLine(), resizeHandle((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.tableDragAndDrop), rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor, tableBorderColor, tableBorderColor, ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper(), ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper(), dragInsertButtonWrapper(), dragCornerControlButton(), DeleteButton(), ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, "var(--ds-surface, white)", ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, "var(--ds-surface, white)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(), tableStickyHeaderFirefoxFixStyle(), ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, "var(--ds-surface, white)", tableToolbarSize, ClassName.TABLE_STICKY, "var(--ds-surface, green)", stickyRowOffsetTop, akEditorTableCellOnStickyHeaderZIndex - 5, "var(--ds-surface, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, akEditorTableCellOnStickyHeaderZIndex, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, "var(--ds-surface, white)", sentinelStyles, OverflowShadow((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.tableDragAndDrop), stickyScrollbarStyles(props.featureFlags), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, tableOverflowShadowWidth, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), columnControlsDecoration(), rowControlsWrapperDotStyle(), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker("\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor, tableBorderRadiusSize, tableHeaderCellBackgroundColor, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1 : akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker("\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton("\n border-bottom: 1px solid ".concat(tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.DRAG_ROW_CONTROLS, akEditorUnitZIndex, ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, ClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #C1C7D0)", ClassName.DRAG_COLUMN_CONTROLS, ClassName.DRAG_COLUMN_CONTROLS_INNER, "var(--ds-space-negative-150, -12px)", resizeHandlerZIndex, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #C1C7D0)", ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, ClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, ".concat(N0, ")"), ClassName.DRAG_HANDLE_DISABLED, ClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DCDFE4)", "var(--ds-background-accent-gray-subtlest, #F4F5F7)", "var(--ds-icon-disabled, #BFDBF847)", ClassName.DRAG_HANDLE_DISABLED, "var(--ds-background-accent-gray-subtler, #DCDFE4)", "var(--ds-icon-subtle, #626f86)", "var(--ds-background-accent-blue-subtle, #579DFF)", "var(--ds-icon-inverse, #FFF)", "var(--ds-border-focused, #2684FF)", "var(--ds-background-accent-blue-subtle, #579dff)", "var(--ds-icon-inverse, #fff)", "var(--ds-background-accent-red-subtler-pressed, #F87462)", "var(--ds-border-inverse, #FFF)", floatingColumnControls(), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize : akEditorTableToolbarSize - 1, (_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.tableDragAndDrop ? 0 : akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, relativeFontSizeToBase16(fontSize()), tableHeaderCellBackgroundColor, tableTextColor, tableBorderColor, tableBorderColor, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, white)", ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? 0 : 1, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, "var(--ds-text-danger, ".concat(R500, ")"), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, ClassName.HOVERED_NO_HIGHLIGHT, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, ClassName.DRAG_ROW_CONTROLS_WRAPPER, tableMarginTop, tableToolbarSize + 1, rowControlsZIndex + 4, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, tableToolbarSize, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tableMarginTop, ClassName.TABLE_STICKY, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, akEditorTableCellOnStickyHeaderZIndex - 4, tableWrapperStyles(), ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, shadowSentinelStyles);
|
|
76
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", "\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n ", "\n"])), ClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(N20A, ")"), "var(--ds-icon, ".concat(N300, ")"), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(B300, ")"), "var(--ds-icon, white)", baseTableStyles(props), ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, shadowSentinelStyles);
|
|
72
77
|
};
|
|
73
|
-
export var tableFullPageEditorStyles = css(
|
|
74
|
-
export var tableCommentEditorStyles = css(
|
|
78
|
+
export var tableFullPageEditorStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
|
|
79
|
+
export var tableCommentEditorStyles = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
|