@atlaskit/editor-plugin-table 7.16.8 → 7.16.10
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 +16 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +4 -0
- package/dist/cjs/nodeviews/TableComponent.js +28 -5
- package/dist/cjs/nodeviews/TableContainer.js +32 -11
- package/dist/cjs/nodeviews/TableResizer.js +15 -9
- package/dist/cjs/toolbar.js +17 -7
- package/dist/cjs/ui/ColumnResizeWidget/index.js +2 -0
- package/dist/cjs/ui/DragHandle/index.js +10 -3
- package/dist/cjs/ui/DragPreview/index.js +1 -0
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +12 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +3 -1
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +7 -2
- package/dist/cjs/ui/FloatingDeleteButton/DeleteButton.js +7 -2
- package/dist/cjs/ui/FloatingDeleteButton/index.js +2 -0
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +7 -2
- package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +61 -57
- package/dist/cjs/ui/FloatingInsertButton/InsertButton.js +36 -14
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +22 -4
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +2 -0
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +3 -1
- package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +12 -3
- package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +2 -0
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +13 -4
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +50 -43
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +16 -2
- package/dist/cjs/ui/TableFloatingControls/RowDropTarget/index.js +3 -1
- package/dist/cjs/ui/TableFloatingControls/index.js +80 -76
- package/dist/cjs/ui/icons/DragHandleDisabledIcon.js +3 -1
- package/dist/cjs/ui/icons/DragInMotionIcon.js +3 -1
- package/dist/cjs/ui/icons/MinimisedHandle.js +1 -0
- package/dist/cjs/utils/guidelines.js +5 -2
- package/dist/cjs/utils/snapping.js +16 -7
- package/dist/es2019/nodeviews/ExternalDropTargets.js +4 -0
- package/dist/es2019/nodeviews/TableComponent.js +28 -5
- package/dist/es2019/nodeviews/TableContainer.js +32 -11
- package/dist/es2019/nodeviews/TableResizer.js +13 -9
- package/dist/es2019/toolbar.js +13 -3
- package/dist/es2019/ui/ColumnResizeWidget/index.js +2 -0
- package/dist/es2019/ui/DragHandle/index.js +10 -3
- package/dist/es2019/ui/DragPreview/index.js +1 -0
- package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +12 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +3 -1
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +7 -2
- package/dist/es2019/ui/FloatingDeleteButton/DeleteButton.js +7 -2
- package/dist/es2019/ui/FloatingDeleteButton/index.js +2 -0
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +7 -2
- package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +56 -52
- package/dist/es2019/ui/FloatingInsertButton/InsertButton.js +36 -14
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +22 -4
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +2 -0
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
- package/dist/es2019/ui/TableFloatingColumnControls/index.js +3 -1
- package/dist/es2019/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +12 -3
- package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +2 -0
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +13 -4
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +47 -40
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +16 -2
- package/dist/es2019/ui/TableFloatingControls/RowDropTarget/index.js +3 -1
- package/dist/es2019/ui/TableFloatingControls/index.js +78 -74
- package/dist/es2019/ui/icons/DragHandleDisabledIcon.js +3 -1
- package/dist/es2019/ui/icons/DragInMotionIcon.js +3 -1
- package/dist/es2019/ui/icons/MinimisedHandle.js +1 -0
- package/dist/es2019/utils/guidelines.js +5 -2
- package/dist/es2019/utils/snapping.js +16 -7
- package/dist/esm/nodeviews/ExternalDropTargets.js +4 -0
- package/dist/esm/nodeviews/TableComponent.js +28 -5
- package/dist/esm/nodeviews/TableContainer.js +32 -11
- package/dist/esm/nodeviews/TableResizer.js +15 -9
- package/dist/esm/toolbar.js +16 -4
- package/dist/esm/ui/ColumnResizeWidget/index.js +2 -0
- package/dist/esm/ui/DragHandle/index.js +10 -3
- package/dist/esm/ui/DragPreview/index.js +1 -0
- package/dist/esm/ui/FloatingContextualButton/FixedButton.js +12 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +3 -1
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +7 -2
- package/dist/esm/ui/FloatingDeleteButton/DeleteButton.js +7 -2
- package/dist/esm/ui/FloatingDeleteButton/index.js +2 -0
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +7 -2
- package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +61 -57
- package/dist/esm/ui/FloatingInsertButton/InsertButton.js +36 -14
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +22 -4
- package/dist/esm/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +2 -0
- package/dist/esm/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
- package/dist/esm/ui/TableFloatingColumnControls/index.js +3 -1
- package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +12 -3
- package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +2 -0
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +13 -4
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +50 -43
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +16 -2
- package/dist/esm/ui/TableFloatingControls/RowDropTarget/index.js +3 -1
- package/dist/esm/ui/TableFloatingControls/index.js +80 -76
- package/dist/esm/ui/icons/DragHandleDisabledIcon.js +3 -1
- package/dist/esm/ui/icons/DragInMotionIcon.js +3 -1
- package/dist/esm/ui/icons/MinimisedHandle.js +1 -0
- package/dist/esm/utils/guidelines.js +5 -2
- package/dist/esm/utils/snapping.js +16 -7
- package/dist/types/toolbar.d.ts +2 -1
- package/dist/types/utils/guidelines.d.ts +2 -1
- package/dist/types/utils/snapping.d.ts +6 -2
- package/dist/types-ts4.5/toolbar.d.ts +2 -1
- package/dist/types-ts4.5/utils/guidelines.d.ts +2 -1
- package/dist/types-ts4.5/utils/snapping.d.ts +6 -2
- package/docs/0-intro.tsx +1 -0
- package/package.json +1 -1
- package/src/nodeviews/ExternalDropTargets.tsx +4 -0
- package/src/nodeviews/TableComponent.tsx +19 -1
- package/src/nodeviews/TableContainer.tsx +12 -0
- package/src/nodeviews/TableResizer.tsx +20 -10
- package/src/toolbar.tsx +20 -1
- package/src/ui/ColumnResizeWidget/index.tsx +2 -0
- package/src/ui/DragHandle/index.tsx +3 -0
- package/src/ui/DragPreview/index.tsx +1 -0
- package/src/ui/FloatingContextualButton/FixedButton.tsx +10 -0
- package/src/ui/FloatingContextualButton/index.tsx +1 -0
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +3 -0
- package/src/ui/FloatingDeleteButton/DeleteButton.tsx +4 -0
- package/src/ui/FloatingDeleteButton/index.tsx +2 -0
- package/src/ui/FloatingDragMenu/DragMenu.tsx +3 -0
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +3 -0
- package/src/ui/FloatingInsertButton/InsertButton.tsx +14 -0
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +16 -1
- package/src/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +2 -0
- package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +2 -0
- package/src/ui/TableFloatingColumnControls/index.tsx +1 -0
- package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +6 -0
- package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +4 -0
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +5 -0
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +5 -0
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +15 -1
- package/src/ui/TableFloatingControls/RowDropTarget/index.tsx +1 -0
- package/src/ui/TableFloatingControls/index.tsx +1 -0
- package/src/ui/icons/DragHandleDisabledIcon.tsx +1 -0
- package/src/ui/icons/DragInMotionIcon.tsx +1 -0
- package/src/ui/icons/MinimisedHandle.tsx +1 -0
- package/src/utils/guidelines.ts +6 -2
- package/src/utils/snapping.ts +32 -19
|
@@ -211,14 +211,23 @@ export const ColumnControls = ({
|
|
|
211
211
|
key={type}
|
|
212
212
|
style={{
|
|
213
213
|
gridColumn,
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
214
215
|
gridRow: '1',
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
215
217
|
display: 'flex',
|
|
218
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
216
219
|
justifyContent: 'center',
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
217
221
|
alignItems: 'center',
|
|
222
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
218
223
|
height: 'fit-content',
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
219
225
|
placeSelf: 'center',
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
220
227
|
zIndex: 99,
|
|
228
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
221
229
|
width: '100%',
|
|
230
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
222
231
|
position: 'relative',
|
|
223
232
|
}}
|
|
224
233
|
data-testid={`table-floating-column-${
|
|
@@ -306,16 +315,19 @@ export const ColumnControls = ({
|
|
|
306
315
|
|
|
307
316
|
return (
|
|
308
317
|
<div
|
|
318
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
309
319
|
className={ClassName.DRAG_COLUMN_CONTROLS}
|
|
310
320
|
onMouseMove={handleMouseMove}
|
|
311
321
|
>
|
|
312
322
|
<div
|
|
313
323
|
ref={columnControlsRef}
|
|
324
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
314
325
|
className={ClassName.DRAG_COLUMN_CONTROLS_INNER}
|
|
315
326
|
data-testid="table-floating-column-controls"
|
|
316
327
|
style={{
|
|
328
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
317
329
|
gridTemplateColumns: widths,
|
|
318
|
-
|
|
330
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
319
331
|
marginTop,
|
|
320
332
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
321
333
|
width: stickyTop ? containerWidth : undefined,
|
|
@@ -330,12 +342,15 @@ export const ColumnControls = ({
|
|
|
330
342
|
}}
|
|
331
343
|
data-start-index={startIndex}
|
|
332
344
|
data-end-index={endIndex}
|
|
345
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
333
346
|
className={ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER}
|
|
334
347
|
contentEditable={false}
|
|
335
348
|
key={index}
|
|
336
349
|
>
|
|
337
350
|
<div
|
|
351
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
338
352
|
className={ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT}
|
|
353
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
339
354
|
style={columnParams.length - 1 === index ? { right: '0' } : {}}
|
|
340
355
|
/>
|
|
341
356
|
</div>
|
|
@@ -101,7 +101,9 @@ export const ColumnDropTarget = ({
|
|
|
101
101
|
height: height && `${height}px`,
|
|
102
102
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
103
103
|
marginTop: marginTop && `${marginTop}px`,
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
104
105
|
pointerEvents: 'auto',
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
105
107
|
flexShrink: 0,
|
|
106
108
|
}}
|
|
107
109
|
data-drop-target-index={index}
|
|
@@ -34,10 +34,12 @@ export const ColumnDropTargets = ({
|
|
|
34
34
|
return (
|
|
35
35
|
<div
|
|
36
36
|
ref={dropTargetRef}
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
37
38
|
className={ClassName.DRAG_COLUMN_DROP_TARGET_CONTROLS}
|
|
38
39
|
contentEditable={false}
|
|
39
40
|
>
|
|
40
41
|
<div
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
41
43
|
className={ClassName.DRAG_COLUMN_CONTROLS_INNER}
|
|
42
44
|
data-testid="table-floating-column-controls-drop-targets"
|
|
43
45
|
>
|
|
@@ -124,6 +124,7 @@ export const TableFloatingColumnControls = ({
|
|
|
124
124
|
return (
|
|
125
125
|
<div
|
|
126
126
|
ref={containerRef}
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
127
128
|
className={ClassName.DRAG_COLUMN_CONTROLS_WRAPPER}
|
|
128
129
|
data-testid="table-floating-column-controls-wrapper"
|
|
129
130
|
>
|
|
@@ -36,6 +36,7 @@ class CornerControlComponent extends Component<
|
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
38
|
<div
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
40
|
className={classnames(ClassName.CORNER_CONTROLS, {
|
|
40
41
|
active: isActive,
|
|
41
42
|
sticky: this.props.stickyTop !== undefined,
|
|
@@ -52,6 +53,7 @@ class CornerControlComponent extends Component<
|
|
|
52
53
|
<button
|
|
53
54
|
aria-label={formatMessage(messages.cornerControl)}
|
|
54
55
|
type="button"
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
55
57
|
className={classnames(ClassName.CONTROLS_CORNER_BUTTON, {
|
|
56
58
|
danger: isActive && isInDanger,
|
|
57
59
|
})}
|
|
@@ -61,12 +63,16 @@ class CornerControlComponent extends Component<
|
|
|
61
63
|
/>
|
|
62
64
|
|
|
63
65
|
{!isHeaderRowEnabled && (
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
64
67
|
<div className={ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER}>
|
|
68
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 */}
|
|
65
69
|
<div className={ClassName.CONTROLS_INSERT_MARKER} />
|
|
66
70
|
</div>
|
|
67
71
|
)}
|
|
68
72
|
{!isHeaderColumnEnabled && (
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
69
74
|
<div className={ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER}>
|
|
75
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 */}
|
|
70
76
|
<div className={ClassName.CONTROLS_INSERT_MARKER} />
|
|
71
77
|
</div>
|
|
72
78
|
)}
|
|
@@ -50,6 +50,7 @@ const DragCornerControlsComponent = ({
|
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<button
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
53
54
|
className={classnames(ClassName.DRAG_CORNER_BUTTON, {
|
|
54
55
|
active: isActive,
|
|
55
56
|
danger: isActive && isInDanger,
|
|
@@ -60,6 +61,7 @@ const DragCornerControlsComponent = ({
|
|
|
60
61
|
onMouseOut={handleMouseOut}
|
|
61
62
|
contentEditable={false}
|
|
62
63
|
>
|
|
64
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 */}
|
|
63
65
|
<div className={ClassName.DRAG_CORNER_BUTTON_INNER} />
|
|
64
66
|
</button>
|
|
65
67
|
);
|
|
@@ -101,6 +103,7 @@ const DragCornerControlsComponentWithSelection = ({
|
|
|
101
103
|
|
|
102
104
|
return (
|
|
103
105
|
<button
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
104
107
|
className={classnames(ClassName.DRAG_CORNER_BUTTON, {
|
|
105
108
|
active: isActive,
|
|
106
109
|
danger: isActive && isInDanger,
|
|
@@ -111,6 +114,7 @@ const DragCornerControlsComponentWithSelection = ({
|
|
|
111
114
|
onMouseOut={handleMouseOut}
|
|
112
115
|
contentEditable={false}
|
|
113
116
|
>
|
|
117
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 */}
|
|
114
118
|
<div className={ClassName.DRAG_CORNER_BUTTON_INNER} />
|
|
115
119
|
</button>
|
|
116
120
|
);
|
|
@@ -39,6 +39,7 @@ export default class NumberColumn extends Component<Props, any> {
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<div
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
42
43
|
className={ClassName.NUMBERED_COLUMN}
|
|
43
44
|
style={{
|
|
44
45
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -57,8 +58,10 @@ export default class NumberColumn extends Component<Props, any> {
|
|
|
57
58
|
isDragAndDropEnabled ? (
|
|
58
59
|
<div
|
|
59
60
|
key={`wrapper-${index}`}
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
60
62
|
className={this.getClassNames(index, true)}
|
|
61
63
|
data-index={index}
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
62
65
|
style={this.getCellStyles(index, rowHeight)}
|
|
63
66
|
onMouseOver={() => updateCellHoverLocation(index)}
|
|
64
67
|
>
|
|
@@ -67,8 +70,10 @@ export default class NumberColumn extends Component<Props, any> {
|
|
|
67
70
|
) : (
|
|
68
71
|
<div
|
|
69
72
|
key={`wrapper-${index}`}
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
70
74
|
className={this.getClassNames(index)}
|
|
71
75
|
data-index={index}
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
72
77
|
style={this.getCellStyles(index, rowHeight)}
|
|
73
78
|
onClick={(event) => this.selectRow(index, event)}
|
|
74
79
|
onMouseOver={() => this.hoverRows(index)}
|
|
@@ -50,7 +50,9 @@ class RowControlsComponent extends Component<Props & WrappedComponentProps> {
|
|
|
50
50
|
: false;
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
53
54
|
<div className={ClassName.ROW_CONTROLS}>
|
|
55
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 */}
|
|
54
56
|
<div className={ClassName.ROW_CONTROLS_INNER}>
|
|
55
57
|
{rowsParams.map(
|
|
56
58
|
({ startIndex, endIndex, height }: RowParams, index) => {
|
|
@@ -71,6 +73,7 @@ class RowControlsComponent extends Component<Props & WrappedComponentProps> {
|
|
|
71
73
|
|
|
72
74
|
return (
|
|
73
75
|
<div
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
74
77
|
className={`${
|
|
75
78
|
ClassName.ROW_CONTROLS_BUTTON_WRAP
|
|
76
79
|
} ${getRowClassNames(
|
|
@@ -99,6 +102,7 @@ class RowControlsComponent extends Component<Props & WrappedComponentProps> {
|
|
|
99
102
|
<button
|
|
100
103
|
aria-label={formatMessage(messages.rowControl)}
|
|
101
104
|
type="button"
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
102
106
|
className={`${ClassName.ROW_CONTROLS_BUTTON} ${ClassName.CONTROLS_BUTTON}`}
|
|
103
107
|
onClick={(event) =>
|
|
104
108
|
this.props.selectRow(startIndex, event.shiftKey)
|
|
@@ -109,6 +113,7 @@ class RowControlsComponent extends Component<Props & WrappedComponentProps> {
|
|
|
109
113
|
data-end-index={endIndex}
|
|
110
114
|
/>
|
|
111
115
|
|
|
116
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 */}
|
|
112
117
|
<div className={ClassName.CONTROLS_INSERT_MARKER} />
|
|
113
118
|
</div>
|
|
114
119
|
);
|
|
@@ -226,13 +226,18 @@ const DragControlsComponent = ({
|
|
|
226
226
|
key={type}
|
|
227
227
|
style={{
|
|
228
228
|
gridRow,
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
229
230
|
gridColumn: '2',
|
|
230
231
|
// DragHandle uses `transform: rotate(90)`, which doesn't affect its parent (this div) causing the width of this element to be the true height of the drag handle
|
|
232
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
231
233
|
display: 'flex',
|
|
234
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
232
235
|
width: '9px',
|
|
236
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
233
237
|
height: '100%',
|
|
238
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
234
239
|
position: 'relative',
|
|
235
|
-
|
|
240
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
236
241
|
right: '-0.5px',
|
|
237
242
|
}}
|
|
238
243
|
data-testid={`table-floating-row-${
|
|
@@ -309,6 +314,7 @@ const DragControlsComponent = ({
|
|
|
309
314
|
|
|
310
315
|
return (
|
|
311
316
|
<div
|
|
317
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
312
318
|
className={ClassName.DRAG_ROW_CONTROLS}
|
|
313
319
|
style={{
|
|
314
320
|
gridTemplateRows: heights,
|
|
@@ -328,14 +334,17 @@ const DragControlsComponent = ({
|
|
|
328
334
|
<div
|
|
329
335
|
style={{
|
|
330
336
|
gridRow: `${index + 1} / span 1`,
|
|
337
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
331
338
|
gridColumn: '2',
|
|
332
339
|
}}
|
|
333
340
|
data-start-index={startIndex}
|
|
334
341
|
data-end-index={endIndex}
|
|
342
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
335
343
|
className={ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER}
|
|
336
344
|
contentEditable={false}
|
|
337
345
|
key={`insert-dot-${index}`}
|
|
338
346
|
>
|
|
347
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 */}
|
|
339
348
|
<div className={ClassName.DRAG_ROW_FLOATING_INSERT_DOT} />
|
|
340
349
|
</div>
|
|
341
350
|
{isDragging && (
|
|
@@ -344,11 +353,16 @@ const DragControlsComponent = ({
|
|
|
344
353
|
index={index}
|
|
345
354
|
localId={currentNodeLocalId}
|
|
346
355
|
style={{
|
|
356
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
347
357
|
gridColumn: '1 / span 3',
|
|
348
358
|
gridRow: `${index + 1} / span 1`,
|
|
359
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
349
360
|
height: '100%',
|
|
361
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
350
362
|
pointerEvents: 'auto',
|
|
363
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
351
364
|
position: 'relative',
|
|
365
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
352
366
|
left: token('space.negative.100', '-8px'),
|
|
353
367
|
}}
|
|
354
368
|
/>
|
|
@@ -87,6 +87,7 @@ const RowDropTarget = ({ index, localId, style }: RowDropTargetProps) => {
|
|
|
87
87
|
return (
|
|
88
88
|
<div
|
|
89
89
|
ref={dropTargetRef}
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
90
91
|
style={style}
|
|
91
92
|
data-drop-target-index={index}
|
|
92
93
|
data-drop-target-localid={localId}
|
|
@@ -127,6 +127,7 @@ export const TableFloatingControls = ({
|
|
|
127
127
|
: ClassName.ROW_CONTROLS_WRAPPER;
|
|
128
128
|
|
|
129
129
|
return (
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
130
131
|
<div className={wrapperClassName}>
|
|
131
132
|
<div onMouseDown={(e) => !isDragAndDropEnabled && e.preventDefault()}>
|
|
132
133
|
{isNumberColumnEnabled ? (
|
|
@@ -13,6 +13,7 @@ export const DragHandleDisabledIcon = ({
|
|
|
13
13
|
viewBox="0 0 24 16"
|
|
14
14
|
fill="none"
|
|
15
15
|
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
16
17
|
style={style}
|
|
17
18
|
data-testid="drag-icon-disabled"
|
|
18
19
|
>
|
|
@@ -13,6 +13,7 @@ export const DragInMotionIcon = ({ style }: DragInMotionIconProps) => (
|
|
|
13
13
|
viewBox="0 0 28 20"
|
|
14
14
|
fill="none"
|
|
15
15
|
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
16
17
|
style={style}
|
|
17
18
|
>
|
|
18
19
|
<rect
|
|
@@ -5,6 +5,7 @@ import { TableCssClassName as ClassName } from '../../types';
|
|
|
5
5
|
export const MinimisedHandleIcon = () => (
|
|
6
6
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="5" fill="none">
|
|
7
7
|
<rect
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
8
9
|
className={ClassName.DRAG_HANDLE_MINIMISED}
|
|
9
10
|
width="24"
|
|
10
11
|
height="5"
|
package/src/utils/guidelines.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createFixedGuidelinesFromLengths } from '@atlaskit/editor-common/guideline';
|
|
2
2
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
3
3
|
|
|
4
|
+
import type { GuidelineExcludeConfig } from './snapping';
|
|
4
5
|
import {
|
|
5
6
|
calculateDefaultSnappings,
|
|
6
7
|
calculateDefaultTablePreserveSnappings,
|
|
@@ -15,12 +16,15 @@ export const defaultGuidelines = createFixedGuidelinesFromLengths([
|
|
|
15
16
|
|
|
16
17
|
export const defaultGuidelinesForPreserveTable = (
|
|
17
18
|
editorContainerWidth: number,
|
|
18
|
-
|
|
19
|
+
exclude: GuidelineExcludeConfig = {
|
|
20
|
+
innerGuidelines: false,
|
|
21
|
+
breakoutPoints: false,
|
|
22
|
+
},
|
|
19
23
|
) => {
|
|
20
24
|
const lengths = calculateDefaultTablePreserveSnappings(
|
|
21
25
|
-1,
|
|
22
26
|
editorContainerWidth,
|
|
23
|
-
|
|
27
|
+
exclude,
|
|
24
28
|
);
|
|
25
29
|
|
|
26
30
|
return createFixedGuidelinesFromLengths(
|
package/src/utils/snapping.ts
CHANGED
|
@@ -26,11 +26,19 @@ export const calculateDefaultSnappings = (lengthOffset: number = 0) => [
|
|
|
26
26
|
akEditorFullWidthLayoutWidth + lengthOffset,
|
|
27
27
|
];
|
|
28
28
|
|
|
29
|
+
export type GuidelineExcludeConfig = {
|
|
30
|
+
innerGuidelines: boolean;
|
|
31
|
+
breakoutPoints: boolean;
|
|
32
|
+
};
|
|
33
|
+
|
|
29
34
|
// FF TablePreserve for calculateDefaultSnappings
|
|
30
35
|
export const calculateDefaultTablePreserveSnappings = (
|
|
31
|
-
lengthOffset
|
|
32
|
-
editorContainerWith
|
|
33
|
-
|
|
36
|
+
lengthOffset = 0,
|
|
37
|
+
editorContainerWith = akEditorFullWidthLayoutWidth,
|
|
38
|
+
exclude: GuidelineExcludeConfig = {
|
|
39
|
+
innerGuidelines: false,
|
|
40
|
+
breakoutPoints: false,
|
|
41
|
+
},
|
|
34
42
|
) => {
|
|
35
43
|
const dynamicFullWidthLine =
|
|
36
44
|
editorContainerWith - akEditorGutterPadding * 2 >=
|
|
@@ -38,24 +46,26 @@ export const calculateDefaultTablePreserveSnappings = (
|
|
|
38
46
|
? akEditorFullWidthLayoutWidth
|
|
39
47
|
: editorContainerWith - akEditorGutterPadding * 2 - tableResizerWidth;
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
const guides = [dynamicFullWidthLine - lengthOffset];
|
|
50
|
+
|
|
51
|
+
if (!exclude.breakoutPoints) {
|
|
52
|
+
guides.unshift(
|
|
43
53
|
akEditorDefaultLayoutWidth + lengthOffset,
|
|
44
54
|
akEditorCalculatedWideLayoutWidth + lengthOffset,
|
|
45
|
-
|
|
46
|
-
];
|
|
55
|
+
);
|
|
47
56
|
}
|
|
48
57
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
if (!exclude.innerGuidelines) {
|
|
59
|
+
guides.unshift(
|
|
60
|
+
0,
|
|
61
|
+
...calculateSubSnappingWidths(
|
|
62
|
+
numberOfLanesInDefaultLayoutWidth,
|
|
63
|
+
akEditorDefaultLayoutWidth + lengthOffset,
|
|
64
|
+
),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return guides;
|
|
59
69
|
};
|
|
60
70
|
|
|
61
71
|
export const defaultSnappingWidths = calculateDefaultSnappings();
|
|
@@ -63,7 +73,10 @@ export const defaultSnappingWidths = calculateDefaultSnappings();
|
|
|
63
73
|
// FF TablePreserve for defaultSnappingWidths
|
|
64
74
|
export const defaultTablePreserveSnappingWidths = (
|
|
65
75
|
editorContainerWidth: number,
|
|
66
|
-
|
|
76
|
+
exclude: GuidelineExcludeConfig = {
|
|
77
|
+
innerGuidelines: false,
|
|
78
|
+
breakoutPoints: false,
|
|
79
|
+
},
|
|
67
80
|
) => {
|
|
68
81
|
return editorContainerWidth - akEditorGutterPadding * 2 >
|
|
69
82
|
akEditorFullWidthLayoutWidth
|
|
@@ -71,7 +84,7 @@ export const defaultTablePreserveSnappingWidths = (
|
|
|
71
84
|
: calculateDefaultTablePreserveSnappings(
|
|
72
85
|
0,
|
|
73
86
|
editorContainerWidth,
|
|
74
|
-
|
|
87
|
+
exclude,
|
|
75
88
|
);
|
|
76
89
|
};
|
|
77
90
|
|