@atlaskit/editor-plugin-table 7.17.0 → 7.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/cjs/toolbar.js +3 -0
- package/dist/cjs/ui/DragHandle/index.js +4 -2
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +5 -1
- package/dist/cjs/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/cjs/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/cjs/ui/FloatingDragMenu/index.js +5 -2
- package/dist/cjs/ui/FloatingDragMenu/styles.js +12 -1
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/cjs/ui/common-styles.js +3 -1
- package/dist/cjs/ui/consts.js +4 -1
- package/dist/cjs/ui/ui-styles.js +35 -3
- package/dist/cjs/utils/drag-menu.js +32 -27
- package/dist/es2019/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/es2019/toolbar.js +3 -0
- package/dist/es2019/ui/DragHandle/index.js +6 -2
- package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +5 -1
- package/dist/es2019/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +38 -11
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/es2019/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +34 -13
- package/dist/es2019/ui/FloatingDragMenu/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/styles.js +11 -3
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +6 -2
- package/dist/es2019/ui/common-styles.js +3 -1
- package/dist/es2019/ui/consts.js +3 -0
- package/dist/es2019/ui/ui-styles.js +36 -3
- package/dist/es2019/utils/drag-menu.js +23 -19
- package/dist/esm/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/esm/toolbar.js +3 -0
- package/dist/esm/ui/DragHandle/index.js +4 -2
- package/dist/esm/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +5 -1
- package/dist/esm/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/esm/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/esm/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/esm/ui/FloatingDragMenu/index.js +5 -2
- package/dist/esm/ui/FloatingDragMenu/styles.js +13 -2
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/esm/ui/common-styles.js +3 -1
- package/dist/esm/ui/consts.js +3 -0
- package/dist/esm/ui/ui-styles.js +35 -3
- package/dist/esm/utils/drag-menu.js +32 -27
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types/ui/consts.d.ts +3 -0
- package/dist/types/utils/drag-menu.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types-ts4.5/ui/consts.d.ts +3 -0
- package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
- package/package.json +2 -2
- package/src/nodeviews/ExternalDropTargets.tsx +2 -1
- package/src/toolbar.tsx +3 -0
- package/src/ui/DragHandle/index.tsx +4 -2
- package/src/ui/FloatingContextualButton/FixedButton.tsx +1 -1
- package/src/ui/FloatingContextualButton/index.tsx +2 -0
- package/src/ui/FloatingContextualButton/styles.ts +10 -0
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +22 -3
- package/src/ui/FloatingContextualMenu/index.tsx +1 -0
- package/src/ui/FloatingContextualMenu/styles.ts +2 -0
- package/src/ui/FloatingDeleteButton/index.tsx +2 -1
- package/src/ui/FloatingDragMenu/DragMenu.tsx +39 -16
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +1 -1
- package/src/ui/FloatingDragMenu/index.tsx +6 -2
- package/src/ui/FloatingDragMenu/styles.ts +20 -3
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +1 -0
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +1 -1
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +4 -2
- package/src/ui/common-styles.ts +2 -1
- package/src/ui/consts.ts +4 -0
- package/src/ui/ui-styles.ts +25 -0
- package/src/utils/drag-menu.ts +28 -18
|
@@ -84,7 +84,9 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
84
84
|
value: {
|
|
85
85
|
name: 'background'
|
|
86
86
|
},
|
|
87
|
-
elemBefore: isDragAndDropEnabled ?
|
|
87
|
+
elemBefore: isDragAndDropEnabled ?
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
89
|
+
jsx("span", {
|
|
88
90
|
css: elementBeforeIconStyles
|
|
89
91
|
}, jsx(EditorBackgroundColorIcon, {
|
|
90
92
|
label: formatMessage(messages.backgroundColor),
|
|
@@ -95,6 +97,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
95
97
|
jsx("div", {
|
|
96
98
|
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
97
99
|
}, jsx("div", {
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
98
101
|
css: cellColourPreviewStyles(background)
|
|
99
102
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
100
103
|
,
|
|
@@ -131,7 +134,9 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
131
134
|
name: 'merge'
|
|
132
135
|
},
|
|
133
136
|
isDisabled: !canMergeCells(state.tr),
|
|
134
|
-
elemBefore: isDragAndDropEnabled ?
|
|
137
|
+
elemBefore: isDragAndDropEnabled ?
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
139
|
+
jsx("span", {
|
|
135
140
|
css: elementBeforeIconStyles
|
|
136
141
|
}, jsx(MergeCellsIcon, null)) : undefined
|
|
137
142
|
}, {
|
|
@@ -140,7 +145,9 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
140
145
|
name: 'split'
|
|
141
146
|
},
|
|
142
147
|
isDisabled: !splitCell(state),
|
|
143
|
-
elemBefore: isDragAndDropEnabled ?
|
|
148
|
+
elemBefore: isDragAndDropEnabled ?
|
|
149
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
150
|
+
jsx("span", {
|
|
144
151
|
css: elementBeforeIconStyles
|
|
145
152
|
}, jsx(SplitCellIcon, null)) : undefined
|
|
146
153
|
}];
|
|
@@ -158,10 +165,13 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
158
165
|
value: {
|
|
159
166
|
name: 'insert_column'
|
|
160
167
|
},
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
161
169
|
elemAfter: jsx("div", {
|
|
162
170
|
css: shortcutStyle
|
|
163
171
|
}, tooltip(addColumnAfter)),
|
|
164
|
-
elemBefore: isDragAndDropEnabled ?
|
|
172
|
+
elemBefore: isDragAndDropEnabled ?
|
|
173
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
174
|
+
jsx("span", {
|
|
165
175
|
css: elementBeforeIconStyles
|
|
166
176
|
}, jsx(AddColRightIcon, null)) : undefined
|
|
167
177
|
};
|
|
@@ -177,10 +187,13 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
177
187
|
value: {
|
|
178
188
|
name: 'insert_row'
|
|
179
189
|
},
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
180
191
|
elemAfter: jsx("div", {
|
|
181
192
|
css: shortcutStyle
|
|
182
193
|
}, tooltip(addRowAfter)),
|
|
183
|
-
elemBefore: isDragAndDropEnabled ?
|
|
194
|
+
elemBefore: isDragAndDropEnabled ?
|
|
195
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
196
|
+
jsx("span", {
|
|
184
197
|
css: elementBeforeIconStyles
|
|
185
198
|
}, jsx(AddRowBelowIcon, null)) : undefined
|
|
186
199
|
};
|
|
@@ -205,10 +218,13 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
205
218
|
value: {
|
|
206
219
|
name: 'clear'
|
|
207
220
|
},
|
|
221
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
208
222
|
elemAfter: jsx("div", {
|
|
209
223
|
css: shortcutStyle
|
|
210
224
|
}, tooltip(backspace)),
|
|
211
|
-
elemBefore: isDragAndDropEnabled ?
|
|
225
|
+
elemBefore: isDragAndDropEnabled ?
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
227
|
+
jsx("span", {
|
|
212
228
|
css: elementBeforeIconStyles
|
|
213
229
|
}, jsx(CrossCircleIcon, {
|
|
214
230
|
label: formatMessage(messages.clearCells, {
|
|
@@ -234,7 +250,9 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
234
250
|
value: {
|
|
235
251
|
name: 'delete_column'
|
|
236
252
|
},
|
|
237
|
-
elemBefore: isDragAndDropEnabled ?
|
|
253
|
+
elemBefore: isDragAndDropEnabled ?
|
|
254
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
255
|
+
jsx("span", {
|
|
238
256
|
css: elementBeforeIconStyles
|
|
239
257
|
}, jsx(RemoveIcon, {
|
|
240
258
|
label: formatMessage(messages.removeColumns, {
|
|
@@ -260,7 +278,9 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
260
278
|
value: {
|
|
261
279
|
name: 'delete_row'
|
|
262
280
|
},
|
|
263
|
-
elemBefore: isDragAndDropEnabled ?
|
|
281
|
+
elemBefore: isDragAndDropEnabled ?
|
|
282
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
283
|
+
jsx("span", {
|
|
264
284
|
css: elementBeforeIconStyles
|
|
265
285
|
}, jsx(RemoveIcon, {
|
|
266
286
|
label: formatMessage(messages.removeRows, {
|
|
@@ -328,17 +348,22 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
328
348
|
});
|
|
329
349
|
_defineProperty(_assertThisInitialized(_this), "createOriginalContextMenuItems", function () {
|
|
330
350
|
var items = [];
|
|
351
|
+
var getEditorFeatureFlags = _this.props.getEditorFeatureFlags;
|
|
352
|
+
var _ref2 = getEditorFeatureFlags ? getEditorFeatureFlags() : {},
|
|
353
|
+
_ref2$tableSortColumn = _ref2.tableSortColumnDiscoverability,
|
|
354
|
+
tableSortColumnDiscoverability = _ref2$tableSortColumn === void 0 ? false : _ref2$tableSortColumn;
|
|
355
|
+
var sortColumnItems = _this.createSortColumnItems();
|
|
331
356
|
var backgroundColorItem = _this.createBackgroundColorItem();
|
|
357
|
+
var distributeColumnsItem = _this.createDistributeColumnsItem();
|
|
358
|
+
tableSortColumnDiscoverability && sortColumnItems && items.push.apply(items, _toConsumableArray(sortColumnItems));
|
|
332
359
|
backgroundColorItem && items.push(backgroundColorItem);
|
|
333
360
|
items.push(_this.createInsertColumnItem());
|
|
334
361
|
items.push(_this.createInsertRowItem());
|
|
335
362
|
items.push(_this.createDeleteColumnItem());
|
|
336
363
|
items.push(_this.createDeleteRowItem());
|
|
337
364
|
items.push.apply(items, _toConsumableArray(_this.createMergeSplitCellItems()));
|
|
338
|
-
var distributeColumnsItem = _this.createDistributeColumnsItem();
|
|
339
365
|
distributeColumnsItem && items.push(distributeColumnsItem);
|
|
340
|
-
|
|
341
|
-
sortColumnItems && items.push.apply(items, _toConsumableArray(sortColumnItems));
|
|
366
|
+
!tableSortColumnDiscoverability && sortColumnItems && items.push.apply(items, _toConsumableArray(sortColumnItems));
|
|
342
367
|
items.push(_this.createClearCellsItem());
|
|
343
368
|
return [{
|
|
344
369
|
items: items
|
|
@@ -369,8 +394,8 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
369
394
|
items[1].items.push(deleteRowItem);
|
|
370
395
|
return items;
|
|
371
396
|
});
|
|
372
|
-
_defineProperty(_assertThisInitialized(_this), "onMenuItemActivated", function (
|
|
373
|
-
var item =
|
|
397
|
+
_defineProperty(_assertThisInitialized(_this), "onMenuItemActivated", function (_ref3) {
|
|
398
|
+
var item = _ref3.item;
|
|
374
399
|
var _this$props10 = _this.props,
|
|
375
400
|
editorView = _this$props10.editorView,
|
|
376
401
|
selectionRect = _this$props10.selectionRect,
|
|
@@ -384,11 +409,11 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
384
409
|
targetCellPosition = _getPluginState11.targetCellPosition,
|
|
385
410
|
_getPluginState11$isT = _getPluginState11.isTableScalingEnabled,
|
|
386
411
|
isTableScalingEnabled = _getPluginState11$isT === void 0 ? false : _getPluginState11$isT;
|
|
387
|
-
var
|
|
388
|
-
|
|
389
|
-
tableDuplicateCellColouring =
|
|
390
|
-
|
|
391
|
-
tableWithFixedColumnWidthsOption =
|
|
412
|
+
var _ref4 = getEditorFeatureFlags ? getEditorFeatureFlags() : {},
|
|
413
|
+
_ref4$tableDuplicateC = _ref4.tableDuplicateCellColouring,
|
|
414
|
+
tableDuplicateCellColouring = _ref4$tableDuplicateC === void 0 ? false : _ref4$tableDuplicateC,
|
|
415
|
+
_ref4$tableWithFixedC = _ref4.tableWithFixedColumnWidthsOption,
|
|
416
|
+
tableWithFixedColumnWidthsOption = _ref4$tableWithFixedC === void 0 ? false : _ref4$tableWithFixedC;
|
|
392
417
|
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption && getBooleanFF('platform.editor.table.use-increased-scaling-percent');
|
|
393
418
|
switch (item.value.name) {
|
|
394
419
|
case 'sort_column_desc':
|
|
@@ -463,8 +488,8 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
463
488
|
isSubmenuOpen: false
|
|
464
489
|
});
|
|
465
490
|
});
|
|
466
|
-
_defineProperty(_assertThisInitialized(_this), "handleItemMouseEnter", function (
|
|
467
|
-
var item =
|
|
491
|
+
_defineProperty(_assertThisInitialized(_this), "handleItemMouseEnter", function (_ref5) {
|
|
492
|
+
var item = _ref5.item;
|
|
468
493
|
var _this$props12 = _this.props,
|
|
469
494
|
_this$props12$editorV = _this$props12.editorView,
|
|
470
495
|
state = _this$props12$editorV.state,
|
|
@@ -487,8 +512,8 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
487
512
|
hoverMergedCells()(state, dispatch);
|
|
488
513
|
}
|
|
489
514
|
});
|
|
490
|
-
_defineProperty(_assertThisInitialized(_this), "handleItemMouseLeave", function (
|
|
491
|
-
var item =
|
|
515
|
+
_defineProperty(_assertThisInitialized(_this), "handleItemMouseLeave", function (_ref6) {
|
|
516
|
+
var item = _ref6.item;
|
|
492
517
|
var _this$props$editorVie2 = _this.props.editorView,
|
|
493
518
|
state = _this$props$editorVie2.state,
|
|
494
519
|
dispatch = _this$props$editorVie2.dispatch;
|
|
@@ -8,10 +8,13 @@ import { contextualMenuDropdownWidth, contextualMenuDropdownWidthDnD } from '../
|
|
|
8
8
|
export var cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
|
|
9
9
|
return css({
|
|
10
10
|
'&::before': {
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
11
12
|
background: selectedColor
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
15
|
};
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
18
|
export var elementBeforeIconStyles = css({
|
|
16
19
|
marginRight: "var(--ds-space-negative-075, -6px)",
|
|
17
20
|
display: 'flex'
|
|
@@ -202,10 +202,12 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
202
202
|
position: 'fixed',
|
|
203
203
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
204
204
|
top: pos.top,
|
|
205
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
205
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
206
206
|
zIndex: stickyRowZIndex,
|
|
207
207
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
208
|
-
left: rect.left + (pos.left || 0) - (this.state.selectionType === 'column' ? this.state.scrollLeft : 0) - (
|
|
208
|
+
left: rect.left + (pos.left || 0) - (this.state.selectionType === 'column' ? this.state.scrollLeft : 0) - (
|
|
209
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
210
|
+
this.props.isNumberColumnEnabled ? akEditorTableNumberColumnWidth : 0)
|
|
209
211
|
}
|
|
210
212
|
}, button), mountTo);
|
|
211
213
|
}
|
|
@@ -89,8 +89,16 @@ var MapDragMenuOptionIdToMessage = {
|
|
|
89
89
|
plural: null
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
var
|
|
93
|
-
var
|
|
92
|
+
var getGroupedDragMenuConfig = function getGroupedDragMenuConfig(tableSortColumnDiscoverability) {
|
|
93
|
+
var groupedDragMenuConfig = [['add_row_above', 'add_row_below', 'add_column_left', 'add_column_right', 'distribute_columns', 'clear_cells', 'delete_row', 'delete_column'], ['move_column_left', 'move_column_right', 'move_row_up', 'move_row_down']];
|
|
94
|
+
var sortColumnItems = ['sort_column_asc', 'sort_column_desc'];
|
|
95
|
+
tableSortColumnDiscoverability ? groupedDragMenuConfig.unshift(sortColumnItems) : groupedDragMenuConfig.push(sortColumnItems);
|
|
96
|
+
return groupedDragMenuConfig;
|
|
97
|
+
};
|
|
98
|
+
var convertToDropdownItems = function convertToDropdownItems(dragMenuConfig, formatMessage) {
|
|
99
|
+
var tableSortColumnDiscoverability = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
100
|
+
var selectionRect = arguments.length > 3 ? arguments[3] : undefined;
|
|
101
|
+
var groupedDragMenuConfig = getGroupedDragMenuConfig(tableSortColumnDiscoverability);
|
|
94
102
|
var menuItemsArr = _toConsumableArray(Array(groupedDragMenuConfig.length)).map(function () {
|
|
95
103
|
return [];
|
|
96
104
|
});
|
|
@@ -138,11 +146,14 @@ var convertToDropdownItems = function convertToDropdownItems(dragMenuConfig, for
|
|
|
138
146
|
name: item.id
|
|
139
147
|
},
|
|
140
148
|
isDisabled: item.disabled,
|
|
141
|
-
elemBefore: item.icon ?
|
|
149
|
+
elemBefore: item.icon ?
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
151
|
+
jsx("span", {
|
|
142
152
|
css: elementBeforeIconStyles
|
|
143
153
|
}, jsx(item.icon, {
|
|
144
154
|
label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options)
|
|
145
155
|
})) : undefined,
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
146
157
|
elemAfter: item.keymap ? jsx("div", {
|
|
147
158
|
css: shortcutStyle
|
|
148
159
|
}, item.keymap) : undefined
|
|
@@ -183,7 +194,8 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
183
194
|
isTableScalingEnabled = _ref.isTableScalingEnabled,
|
|
184
195
|
tableDuplicateCellColouring = _ref.tableDuplicateCellColouring,
|
|
185
196
|
shouldUseIncreasedScalingPercent = _ref.shouldUseIncreasedScalingPercent,
|
|
186
|
-
isTableFixedColumnWidthsOptionEnabled = _ref.isTableFixedColumnWidthsOptionEnabled
|
|
197
|
+
isTableFixedColumnWidthsOptionEnabled = _ref.isTableFixedColumnWidthsOptionEnabled,
|
|
198
|
+
tableSortColumnDiscoverability = _ref.tableSortColumnDiscoverability;
|
|
187
199
|
var state = editorView.state,
|
|
188
200
|
dispatch = editorView.dispatch;
|
|
189
201
|
var selection = state.selection;
|
|
@@ -207,8 +219,8 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
207
219
|
hasMergedCellsInTable = getMergedCellsPositions(state.tr).length > 0;
|
|
208
220
|
}
|
|
209
221
|
var allowBackgroundColor = (_pluginConfig$allowBa = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowBackgroundColor) !== null && _pluginConfig$allowBa !== void 0 ? _pluginConfig$allowBa : false;
|
|
210
|
-
var dragMenuConfig = getDragMenuConfig(direction, getEditorContainerWidth, !shouldMoveDisabled, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.isHeaderRowRequired, isTableScalingEnabled, tableDuplicateCellColouring, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent);
|
|
211
|
-
var _convertToDropdownIte = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect),
|
|
222
|
+
var dragMenuConfig = getDragMenuConfig(direction, getEditorContainerWidth, !shouldMoveDisabled, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.isHeaderRowRequired, isTableScalingEnabled, tableDuplicateCellColouring, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, tableSortColumnDiscoverability);
|
|
223
|
+
var _convertToDropdownIte = convertToDropdownItems(dragMenuConfig, formatMessage, tableSortColumnDiscoverability, selectionRect),
|
|
212
224
|
menuItems = _convertToDropdownIte.menuItems,
|
|
213
225
|
menuCallback = _convertToDropdownIte.menuCallback;
|
|
214
226
|
var handleSubMenuRef = function handleSubMenuRef(ref) {
|
|
@@ -246,7 +258,9 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
246
258
|
value: {
|
|
247
259
|
name: 'background'
|
|
248
260
|
},
|
|
249
|
-
elemBefore:
|
|
261
|
+
elemBefore:
|
|
262
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
263
|
+
jsx("span", {
|
|
250
264
|
css: elementBeforeIconStyles
|
|
251
265
|
}, jsx(EditorBackgroundColorIcon, {
|
|
252
266
|
label: formatMessage(messages.backgroundColor),
|
|
@@ -254,9 +268,12 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
254
268
|
})),
|
|
255
269
|
elemAfter: jsx("div", {
|
|
256
270
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
257
|
-
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
258
|
-
css
|
|
271
|
+
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
272
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
273
|
+
,
|
|
274
|
+
css: dragMenuBackgroundColorStyles(tableSortColumnDiscoverability)
|
|
259
275
|
}, jsx("div", {
|
|
276
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
260
277
|
css: cellColourPreviewStyles(background)
|
|
261
278
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
262
279
|
,
|
|
@@ -311,7 +328,9 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
311
328
|
value: {
|
|
312
329
|
name: 'header_column'
|
|
313
330
|
},
|
|
314
|
-
elemAfter:
|
|
331
|
+
elemAfter:
|
|
332
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
333
|
+
jsx("div", {
|
|
315
334
|
css: toggleStyles
|
|
316
335
|
}, jsx(Toggle, {
|
|
317
336
|
id: "toggle-header-column",
|
|
@@ -324,7 +343,9 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
324
343
|
value: {
|
|
325
344
|
name: 'header_row'
|
|
326
345
|
},
|
|
327
|
-
elemAfter:
|
|
346
|
+
elemAfter:
|
|
347
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
348
|
+
jsx("div", {
|
|
328
349
|
css: toggleStyles
|
|
329
350
|
}, jsx(Toggle, {
|
|
330
351
|
id: "toggle-header-row",
|
|
@@ -340,7 +361,9 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
340
361
|
value: {
|
|
341
362
|
name: 'row_numbers'
|
|
342
363
|
},
|
|
343
|
-
elemAfter:
|
|
364
|
+
elemAfter:
|
|
365
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
366
|
+
jsx("div", {
|
|
344
367
|
css: toggleStyles
|
|
345
368
|
}, jsx(Toggle, {
|
|
346
369
|
id: "toggle-row-numbers",
|
|
@@ -446,7 +469,7 @@ export var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
446
469
|
return null;
|
|
447
470
|
}
|
|
448
471
|
if (allowBackgroundColor) {
|
|
449
|
-
menuItems[0].items.unshift(createBackgroundColorMenuItem());
|
|
472
|
+
tableSortColumnDiscoverability ? menuItems[1].items.unshift(createBackgroundColorMenuItem()) : menuItems[0].items.unshift(createBackgroundColorMenuItem());
|
|
450
473
|
}
|
|
451
474
|
|
|
452
475
|
// If first row, add toggle for Header row, default is true
|
|
@@ -34,7 +34,9 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
34
34
|
_ref2$tableDuplicateC = _ref2.tableDuplicateCellColouring,
|
|
35
35
|
tableDuplicateCellColouring = _ref2$tableDuplicateC === void 0 ? false : _ref2$tableDuplicateC,
|
|
36
36
|
_ref2$tableWithFixedC = _ref2.tableWithFixedColumnWidthsOption,
|
|
37
|
-
tableWithFixedColumnWidthsOption = _ref2$tableWithFixedC === void 0 ? false : _ref2$tableWithFixedC
|
|
37
|
+
tableWithFixedColumnWidthsOption = _ref2$tableWithFixedC === void 0 ? false : _ref2$tableWithFixedC,
|
|
38
|
+
_ref2$tableSortColumn = _ref2.tableSortColumnDiscoverability,
|
|
39
|
+
tableSortColumnDiscoverability = _ref2$tableSortColumn === void 0 ? false : _ref2$tableSortColumn;
|
|
38
40
|
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption && getBooleanFF('platform.editor.table.use-increased-scaling-percent');
|
|
39
41
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
40
42
|
alignX: direction === 'row' ? 'right' : undefined,
|
|
@@ -72,7 +74,8 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
72
74
|
isTableScalingEnabled: isTableScalingEnabled,
|
|
73
75
|
tableDuplicateCellColouring: tableDuplicateCellColouring,
|
|
74
76
|
shouldUseIncreasedScalingPercent: shouldUseIncreasedScalingPercent,
|
|
75
|
-
isTableFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption
|
|
77
|
+
isTableFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption,
|
|
78
|
+
tableSortColumnDiscoverability: tableSortColumnDiscoverability
|
|
76
79
|
}));
|
|
77
80
|
};
|
|
78
81
|
FloatingDragMenu.displayName = 'FloatingDragMenu';
|
|
@@ -4,32 +4,43 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { tableBackgroundBorderColor } from '@atlaskit/adf-schema';
|
|
5
5
|
import { N60A, N90 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { TableCssClassName as ClassName } from '../../types';
|
|
7
|
-
import { dragMenuDropdownWidth } from '../consts';
|
|
7
|
+
import { dragMenuDropdownWidth, TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT, TABLE_DRAG_MENU_PADDING_TOP, TABLE_DRAG_MENU_SORT_GROUP_HEIGHT } from '../consts';
|
|
8
8
|
export var cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
|
|
9
9
|
return css({
|
|
10
10
|
'&::before': {
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
11
12
|
background: selectedColor
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
15
|
};
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
18
|
export var elementBeforeIconStyles = css({
|
|
16
19
|
marginRight: "var(--ds-space-negative-075, -6px)",
|
|
17
20
|
display: 'flex'
|
|
18
21
|
});
|
|
19
22
|
|
|
20
23
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
21
|
-
export var dragMenuBackgroundColorStyles =
|
|
24
|
+
export var dragMenuBackgroundColorStyles = function dragMenuBackgroundColorStyles() {
|
|
25
|
+
var tableSortColumnDiscoverability = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
26
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), ClassName.DRAG_SUBMENU, "var(--ds-border-radius, 3px)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), tableSortColumnDiscoverability ? TABLE_DRAG_MENU_PADDING_TOP + TABLE_DRAG_MENU_SORT_GROUP_HEIGHT + TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT : 0, dragMenuDropdownWidth, "var(--ds-space-100, 8px)", ClassName.DRAG_SUBMENU_ICON, tableBackgroundBorderColor, "var(--ds-border-radius, 3px)", "var(--ds-space-050, 4px)", "var(--ds-icon, ".concat(N90, ")"));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
22
30
|
export var toggleStyles = css({
|
|
23
31
|
display: 'flex',
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
24
33
|
"input[type='checkbox']": {
|
|
25
34
|
width: '30px',
|
|
26
35
|
height: '14px',
|
|
27
36
|
pointerEvents: 'initial',
|
|
28
37
|
cursor: 'pointer'
|
|
29
38
|
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
30
40
|
'> label': {
|
|
31
41
|
margin: '0px',
|
|
32
42
|
pointerEvents: 'none',
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
33
44
|
'> span': {
|
|
34
45
|
pointerEvents: 'none'
|
|
35
46
|
}
|
|
@@ -105,7 +105,9 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
105
105
|
style: {
|
|
106
106
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
107
107
|
marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
|
|
108
|
-
borderLeft:
|
|
108
|
+
borderLeft:
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
110
|
+
isDragAndDropEnabled && tableActive ? "1px solid ".concat(tableBorderColor) : undefined
|
|
109
111
|
},
|
|
110
112
|
contentEditable: false
|
|
111
113
|
}, rowHeights.map(function (rowHeight, index) {
|
|
@@ -80,7 +80,7 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
|
80
80
|
marginTop: "".concat(marginTop, "px"),
|
|
81
81
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
82
82
|
top: thisRowSticky ? "".concat(_this2.props.stickyTop + 3, "px") : undefined,
|
|
83
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
83
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
84
84
|
paddingTop: thisRowSticky ? "".concat(tableControlsSpacing, "px") : undefined
|
|
85
85
|
}
|
|
86
86
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -192,9 +192,11 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
192
192
|
className: ClassName.DRAG_ROW_CONTROLS,
|
|
193
193
|
style: {
|
|
194
194
|
gridTemplateRows: heights,
|
|
195
|
-
gridTemplateColumns: isDragging ?
|
|
195
|
+
gridTemplateColumns: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
196
|
+
"".concat(dropTargetExtendedWidth, "px 14px ").concat(tableWidth, "px") : '0px 14px 0px',
|
|
196
197
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
197
|
-
left: isDragging ?
|
|
198
|
+
left: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
199
|
+
"-".concat(dropTargetExtendedWidth + 2, "px") : "var(--ds-space-negative-025, -2px)"
|
|
198
200
|
},
|
|
199
201
|
onMouseMove: handleMouseMove,
|
|
200
202
|
contentEditable: false
|
|
@@ -76,6 +76,8 @@ export var tableStyles = function tableStyles(props) {
|
|
|
76
76
|
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror.", " {\n\t\t.", " {\n\t\t\toverflow-x: auto;\n\t\t\t", ";\n\t\t}\n\t}\n\n\t.ProseMirror.", " {\n\t\tcursor: col-resize;\n\t}\n\n\t", "\n"])), baseTableStyles(props), ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, shadowSentinelStyles);
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
79
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
80
80
|
export var tableFullPageEditorStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n\t.ProseMirror .", " > table {\n\t\tmargin-left: 0;\n\t\t// 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n\t\tmargin-right: -1px;\n\t\twidth: 100%;\n\t}\n"])), ClassName.TABLE_NODE_WRAPPER);
|
|
81
|
+
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
81
83
|
export var tableCommentEditorStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n\t.ProseMirror .", " > table {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t\t", ";\n\t}\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
|
package/dist/esm/ui/consts.js
CHANGED
|
@@ -67,6 +67,9 @@ export var STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
|
67
67
|
// table margins and padding. For example a guideline at 1800px and the view at 1860px wide, means the guidelines is visible
|
|
68
68
|
// BUT it cannot be snapped to during resize due to padding being applied to the resizer wrapper. This accommodates that difference.
|
|
69
69
|
export var TABLE_GUIDELINE_VISIBLE_ADJUSTMENT = -68;
|
|
70
|
+
export var TABLE_DRAG_MENU_SORT_GROUP_HEIGHT = 92;
|
|
71
|
+
export var TABLE_DRAG_MENU_PADDING_TOP = 4;
|
|
72
|
+
export var TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT = 6;
|
|
70
73
|
export var dragMenuDropdownWidth = 250;
|
|
71
74
|
export var dragTableInsertColumnButtonSize = 16;
|
|
72
75
|
export var dropTargetExtendedWidth = 150;
|
package/dist/esm/ui/ui-styles.js
CHANGED
|
@@ -12,9 +12,12 @@ var InsertLine = function InsertLine(cssString) {
|
|
|
12
12
|
};
|
|
13
13
|
var Marker = function Marker() {
|
|
14
14
|
return css({
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
15
16
|
backgroundColor: tableBorderColor,
|
|
16
17
|
position: 'absolute',
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
17
19
|
height: "".concat(lineMarkerSize, "px"),
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
21
|
width: "".concat(lineMarkerSize, "px"),
|
|
19
22
|
borderRadius: '50%',
|
|
20
23
|
pointerEvents: 'none'
|
|
@@ -54,10 +57,22 @@ export var dragCornerControlButton = function dragCornerControlButton() {
|
|
|
54
57
|
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n\t.", " {\n\t\twidth: 15px;\n\t\theight: 15px;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tposition: absolute;\n\t\ttop: -17px;\n\t\tleft: -5px;\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tpadding: 0;\n\t\toutline: none;\n\t\tz-index: ", ";\n\n\t\t&.active .", " {\n\t\t\tbackground-color: ", ";\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tborder-width: 2px;\n\t\t\tborder-radius: 4px;\n\n\t\t\ttop: 3px;\n\t\t\tleft: 2px;\n\t\t}\n\n\t\t&:hover {\n\t\t\tcursor: pointer;\n\n\t\t\t.", " {\n\t\t\t\twidth: 10px;\n\t\t\t\theight: 10px;\n\t\t\t\tborder-radius: 4px;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 2px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tborder: 1px solid ", ";\n\t\tbackground-color: ", ";\n\t\tborder-radius: 2px;\n\t\twidth: 5px;\n\t\theight: 5px;\n\t\tposition: relative;\n\t}\n"])), ClassName.DRAG_CORNER_BUTTON, akEditorUnitZIndex * 99, ClassName.DRAG_CORNER_BUTTON_INNER, "var(--ds-border-selected, #0C66E4)", ClassName.DRAG_CORNER_BUTTON_INNER, ClassName.DRAG_CORNER_BUTTON_INNER, "var(--ds-border-inverse, #FFF)", "var(--ds-background-accent-gray-subtler, #DCDFE4)");
|
|
55
58
|
};
|
|
56
59
|
export var insertColumnButtonWrapper = function insertColumnButtonWrapper() {
|
|
57
|
-
return css(
|
|
60
|
+
return css(
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
62
|
+
InsertButton(),
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
64
|
+
InsertButtonHover(),
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
|
+
InsertLine("\n width: 2px;\n left: 9px;\n "));
|
|
58
67
|
};
|
|
59
68
|
export var insertRowButtonWrapper = function insertRowButtonWrapper() {
|
|
60
|
-
return css(
|
|
69
|
+
return css(
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
|
+
InsertButton(),
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
73
|
+
InsertButtonHover(),
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
75
|
+
InsertLine("\n height: 2px;\n top: -11px;\n// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766\n left: ".concat(tableInsertColumnButtonSize - 1, "px;\n ")));
|
|
61
76
|
};
|
|
62
77
|
export var columnControlsLineMarker = function columnControlsLineMarker() {
|
|
63
78
|
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n\t.", ".", " table tr:first-of-type td,\n\t.", ".", " table tr:first-of-type th {\n\t\tposition: relative;\n\t}\n"])), ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS);
|
|
@@ -75,20 +90,27 @@ var overflowShadowWidhoutDnD = function overflowShadowWidhoutDnD(isDragAndDropEn
|
|
|
75
90
|
};
|
|
76
91
|
var columnHeaderButton = function columnHeaderButton(cssString) {
|
|
77
92
|
return css({
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
78
94
|
background: tableHeaderCellBackgroundColor,
|
|
79
95
|
display: 'block',
|
|
80
96
|
boxSizing: 'border-box',
|
|
81
97
|
padding: 0,
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
82
99
|
':focus': {
|
|
83
100
|
outline: 'none'
|
|
84
101
|
}
|
|
85
|
-
},
|
|
102
|
+
},
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
104
|
+
cssString);
|
|
86
105
|
};
|
|
87
106
|
var columnHeaderButtonSelected = function columnHeaderButtonSelected() {
|
|
88
107
|
return css({
|
|
89
108
|
color: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
90
110
|
backgroundColor: tableToolbarSelectedColor,
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
91
112
|
borderColor: tableBorderSelectedColor,
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
92
114
|
zIndex: columnControlsSelectedZIndex
|
|
93
115
|
});
|
|
94
116
|
};
|
|
@@ -110,6 +132,8 @@ export var hoveredDeleteButton = function hoveredDeleteButton() {
|
|
|
110
132
|
export var hoveredCell = function hoveredCell() {
|
|
111
133
|
return css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n\t:not(.", ")\n\t\t.", ":not(.", ") {\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t.", ".", " {\n\t\t\tposition: relative;\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t}\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL, tableBorderSelectedColor, ClassName.HOVERED_CELL, ClassName.HOVERED_NO_HIGHLIGHT, tableBorderColor);
|
|
112
134
|
};
|
|
135
|
+
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
113
137
|
export var hoveredWarningCell = css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n\t:not(.", ")\n\t\t.", ":not(.", ") {\n\t\ttd.", " {\n\t\t\tbackground-color: ", " !important; // We need to override the background-color added to the cell\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t}\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL_WARNING, "var(--ds-background-warning, ".concat(Y50, ")"), "var(--ds-border-warning, ".concat(Y200, ")"));
|
|
114
138
|
|
|
115
139
|
// Explicit pixel values required here to ensure correct positioning and sizes of column resize handle
|
|
@@ -128,22 +152,30 @@ export var resizeHandle = function resizeHandle(isDragAndDropEnabled) {
|
|
|
128
152
|
var tableCellColumnInsertLineStyles = css({
|
|
129
153
|
content: "' '",
|
|
130
154
|
position: 'absolute',
|
|
155
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
131
156
|
height: "calc(100% + ".concat(tableCellBorderWidth * 2, "px)"),
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
132
158
|
width: "".concat(insertLineWidth, "px"),
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
133
160
|
zIndex: columnControlsZIndex * 2
|
|
134
161
|
});
|
|
135
162
|
var tableCellRowInsertLineStyles = css({
|
|
136
163
|
content: "' '",
|
|
137
164
|
position: 'absolute',
|
|
138
165
|
left: "var(--ds-space-negative-025, -2px)",
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
139
167
|
height: "".concat(insertLineWidth, "px"),
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
140
169
|
width: "calc(100% + ".concat(tableCellBorderWidth * 2, "px)"),
|
|
170
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
141
171
|
zIndex: columnControlsZIndex * 2
|
|
142
172
|
});
|
|
143
173
|
var insertLineActiveColor = css({
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
144
175
|
backgroundColor: tableBorderSelectedColor
|
|
145
176
|
});
|
|
146
177
|
var insertLineInactiveColor = css({
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
147
179
|
backgroundColor: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")")
|
|
148
180
|
});
|
|
149
181
|
|