@atlaskit/editor-plugin-table 7.16.7 → 7.16.9
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 +17 -0
- package/dist/cjs/commands/misc.js +11 -1
- package/dist/cjs/nodeviews/ExternalDropTargets.js +4 -0
- package/dist/cjs/nodeviews/TableComponent.js +28 -5
- package/dist/cjs/nodeviews/TableContainer.js +38 -12
- package/dist/cjs/nodeviews/TableResizer.js +27 -6
- 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/es2019/commands/misc.js +10 -0
- package/dist/es2019/nodeviews/ExternalDropTargets.js +4 -0
- package/dist/es2019/nodeviews/TableComponent.js +28 -5
- package/dist/es2019/nodeviews/TableContainer.js +37 -12
- package/dist/es2019/nodeviews/TableResizer.js +27 -6
- 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/esm/commands/misc.js +10 -0
- package/dist/esm/nodeviews/ExternalDropTargets.js +4 -0
- package/dist/esm/nodeviews/TableComponent.js +28 -5
- package/dist/esm/nodeviews/TableContainer.js +38 -12
- package/dist/esm/nodeviews/TableResizer.js +29 -8
- 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/types/commands/misc.d.ts +2 -1
- package/dist/types/nodeviews/TableContainer.d.ts +3 -2
- package/dist/types/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types/toolbar.d.ts +2 -1
- package/dist/types-ts4.5/commands/misc.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +3 -2
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types-ts4.5/toolbar.d.ts +2 -1
- package/docs/0-intro.tsx +1 -0
- package/package.json +2 -2
- package/src/commands/misc.ts +20 -1
- package/src/nodeviews/ExternalDropTargets.tsx +4 -0
- package/src/nodeviews/TableComponent.tsx +18 -0
- package/src/nodeviews/TableContainer.tsx +17 -1
- package/src/nodeviews/TableResizer.tsx +52 -6
- 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
|
@@ -39,47 +39,54 @@ class RowControlsComponent extends Component {
|
|
|
39
39
|
const rowsParams = getRowsParams(rowHeights);
|
|
40
40
|
const firstRow = tableRef.querySelector('tr');
|
|
41
41
|
const hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
className: `${ClassName.ROW_CONTROLS_BUTTON_WRAP} ${getRowClassNames(startIndex, selectionState || selection, hoveredRows, isInDanger, isResizing)} ${thisRowSticky ? 'sticky' : ''}`,
|
|
59
|
-
key: startIndex,
|
|
60
|
-
style: {
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
62
|
-
height: height,
|
|
63
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
64
|
-
marginTop: `${marginTop}px`,
|
|
65
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
66
|
-
top: thisRowSticky ? `${this.props.stickyTop + 3}px` : undefined,
|
|
67
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
68
|
-
paddingTop: thisRowSticky ? `${tableControlsSpacing}px` : undefined
|
|
42
|
+
return (
|
|
43
|
+
/*#__PURE__*/
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
45
|
+
React.createElement("div", {
|
|
46
|
+
className: ClassName.ROW_CONTROLS
|
|
47
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: ClassName.ROW_CONTROLS_INNER
|
|
49
|
+
}, rowsParams.map(({
|
|
50
|
+
startIndex,
|
|
51
|
+
endIndex,
|
|
52
|
+
height
|
|
53
|
+
}, index) => {
|
|
54
|
+
// if previous row was header row, add its height to our margin
|
|
55
|
+
let marginTop = -1;
|
|
56
|
+
if (index === 1 && hasHeaderRow && this.props.stickyTop !== undefined) {
|
|
57
|
+
marginTop += rowHeights[index - 1] + tableToolbarSize;
|
|
69
58
|
}
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
59
|
+
const thisRowSticky = this.props.stickyTop !== undefined && index === 0 && hasHeaderRow;
|
|
60
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
62
|
+
className: `${ClassName.ROW_CONTROLS_BUTTON_WRAP} ${getRowClassNames(startIndex, selectionState || selection, hoveredRows, isInDanger, isResizing)} ${thisRowSticky ? 'sticky' : ''}`,
|
|
63
|
+
key: startIndex,
|
|
64
|
+
style: {
|
|
65
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
66
|
+
height: height,
|
|
67
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
68
|
+
marginTop: `${marginTop}px`,
|
|
69
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
70
|
+
top: thisRowSticky ? `${this.props.stickyTop + 3}px` : undefined,
|
|
71
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
72
|
+
paddingTop: thisRowSticky ? `${tableControlsSpacing}px` : undefined
|
|
73
|
+
}
|
|
74
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
75
|
+
"aria-label": formatMessage(messages.rowControl),
|
|
76
|
+
type: "button"
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
78
|
+
,
|
|
79
|
+
className: `${ClassName.ROW_CONTROLS_BUTTON} ${ClassName.CONTROLS_BUTTON}`,
|
|
80
|
+
onClick: event => this.props.selectRow(startIndex, event.shiftKey),
|
|
81
|
+
onMouseOver: () => this.props.hoverRows([startIndex]),
|
|
82
|
+
onMouseOut: this.clearHoverSelection,
|
|
83
|
+
"data-start-index": startIndex,
|
|
84
|
+
"data-end-index": endIndex
|
|
85
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: ClassName.CONTROLS_INSERT_MARKER
|
|
87
|
+
}));
|
|
88
|
+
})))
|
|
89
|
+
);
|
|
83
90
|
}
|
|
84
91
|
}
|
|
85
92
|
export const RowControls = injectIntl(RowControlsComponent);
|
|
@@ -134,13 +134,18 @@ const DragControlsComponent = ({
|
|
|
134
134
|
key: type,
|
|
135
135
|
style: {
|
|
136
136
|
gridRow,
|
|
137
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
137
138
|
gridColumn: '2',
|
|
138
139
|
// 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
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
139
141
|
display: 'flex',
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
140
143
|
width: '9px',
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
141
145
|
height: '100%',
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
142
147
|
position: 'relative',
|
|
143
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
148
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
144
149
|
right: '-0.5px'
|
|
145
150
|
},
|
|
146
151
|
"data-testid": `table-floating-row-${isHover ? rowIndex : selectedRowIndexes[0]}-drag-handle`
|
|
@@ -181,6 +186,7 @@ const DragControlsComponent = ({
|
|
|
181
186
|
return null;
|
|
182
187
|
}
|
|
183
188
|
return /*#__PURE__*/React.createElement("div", {
|
|
189
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
184
190
|
className: ClassName.DRAG_ROW_CONTROLS,
|
|
185
191
|
style: {
|
|
186
192
|
gridTemplateRows: heights,
|
|
@@ -198,10 +204,13 @@ const DragControlsComponent = ({
|
|
|
198
204
|
}, /*#__PURE__*/React.createElement("div", {
|
|
199
205
|
style: {
|
|
200
206
|
gridRow: `${index + 1} / span 1`,
|
|
207
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
201
208
|
gridColumn: '2'
|
|
202
209
|
},
|
|
203
210
|
"data-start-index": startIndex,
|
|
204
|
-
"data-end-index": endIndex
|
|
211
|
+
"data-end-index": endIndex
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
213
|
+
,
|
|
205
214
|
className: ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER,
|
|
206
215
|
contentEditable: false,
|
|
207
216
|
key: `insert-dot-${index}`
|
|
@@ -212,11 +221,16 @@ const DragControlsComponent = ({
|
|
|
212
221
|
index: index,
|
|
213
222
|
localId: currentNodeLocalId,
|
|
214
223
|
style: {
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
215
225
|
gridColumn: '1 / span 3',
|
|
216
226
|
gridRow: `${index + 1} / span 1`,
|
|
227
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
217
228
|
height: '100%',
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
218
230
|
pointerEvents: 'auto',
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
219
232
|
position: 'relative',
|
|
233
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
220
234
|
left: "var(--ds-space-negative-100, -8px)"
|
|
221
235
|
}
|
|
222
236
|
}))), rowHandles());
|
|
@@ -70,7 +70,9 @@ const RowDropTarget = ({
|
|
|
70
70
|
});
|
|
71
71
|
}, [index, localId]);
|
|
72
72
|
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
ref: dropTargetRef
|
|
73
|
+
ref: dropTargetRef
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
75
|
+
,
|
|
74
76
|
style: style,
|
|
75
77
|
"data-drop-target-index": index,
|
|
76
78
|
"data-drop-target-localid": localId,
|
|
@@ -75,79 +75,83 @@ export const TableFloatingControls = ({
|
|
|
75
75
|
}
|
|
76
76
|
const stickyTop = stickyHeader && stickyHeader.sticky && hasHeaderRow ? stickyHeader.top : undefined;
|
|
77
77
|
const wrapperClassName = isDragAndDropEnabled ? ClassName.DRAG_ROW_CONTROLS_WRAPPER : ClassName.ROW_CONTROLS_WRAPPER;
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
78
|
+
return (
|
|
79
|
+
/*#__PURE__*/
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
81
|
+
React.createElement("div", {
|
|
82
|
+
className: wrapperClassName
|
|
83
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
onMouseDown: e => !isDragAndDropEnabled && e.preventDefault()
|
|
85
|
+
}, isNumberColumnEnabled ? /*#__PURE__*/React.createElement(NumberColumn, {
|
|
86
|
+
editorView: editorView,
|
|
87
|
+
hoverRows: _hoverRows,
|
|
88
|
+
tableRef: tableRef,
|
|
89
|
+
tableActive: tableActive,
|
|
90
|
+
hoveredRows: hoveredRows,
|
|
91
|
+
hasHeaderRow: hasHeaderRow,
|
|
92
|
+
isInDanger: isInDanger,
|
|
93
|
+
isResizing: isResizing,
|
|
94
|
+
selectRow: _selectRow,
|
|
95
|
+
updateCellHoverLocation: updateCellHoverLocation,
|
|
96
|
+
stickyTop: stickyTop,
|
|
97
|
+
isDragAndDropEnabled: isDragAndDropEnabled
|
|
98
|
+
}) : 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, {
|
|
99
|
+
editorView: editorView,
|
|
100
|
+
tableRef: tableRef,
|
|
101
|
+
isInDanger: isInDanger,
|
|
102
|
+
isResizing: isResizing,
|
|
103
|
+
api: api
|
|
104
|
+
}) : /*#__PURE__*/React.createElement(DragCornerControls, {
|
|
105
|
+
editorView: editorView,
|
|
106
|
+
tableRef: tableRef,
|
|
107
|
+
isInDanger: isInDanger,
|
|
108
|
+
isResizing: isResizing
|
|
109
|
+
}), /*#__PURE__*/React.createElement(DragControls, {
|
|
110
|
+
tableRef: tableRef,
|
|
111
|
+
tableNode: tableNode,
|
|
112
|
+
hoveredCell: hoveredCell,
|
|
113
|
+
isTableHovered: isTableHovered,
|
|
114
|
+
editorView: editorView,
|
|
115
|
+
tableActive: tableActive,
|
|
116
|
+
isInDanger: isInDanger,
|
|
117
|
+
isResizing: isResizing,
|
|
118
|
+
tableWidth: tableWrapperWidth,
|
|
119
|
+
hoverRows: _hoverRows,
|
|
120
|
+
selectRow: _selectRow,
|
|
121
|
+
selectRows: _selectRows,
|
|
122
|
+
updateCellHoverLocation: updateCellHoverLocation
|
|
123
|
+
})) : getBooleanFF('platform.editor.table.use-shared-state-hook') ? /*#__PURE__*/React.createElement(FloatingControlsWithSelection, {
|
|
124
|
+
editorView: editorView,
|
|
125
|
+
tableRef: tableRef,
|
|
126
|
+
isInDanger: isInDanger,
|
|
127
|
+
isResizing: isResizing,
|
|
128
|
+
isHeaderRowEnabled: isHeaderRowEnabled,
|
|
129
|
+
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
130
|
+
hoveredRows: hoveredRows,
|
|
131
|
+
stickyTop: tableActive ? stickyTop : undefined,
|
|
132
|
+
tableActive: tableActive,
|
|
133
|
+
hoverRows: _hoverRows,
|
|
134
|
+
selectRow: _selectRow,
|
|
135
|
+
api: api
|
|
136
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
|
|
137
|
+
editorView: editorView,
|
|
138
|
+
tableRef: tableRef,
|
|
139
|
+
isInDanger: isInDanger,
|
|
140
|
+
isResizing: isResizing,
|
|
141
|
+
isHeaderRowEnabled: isHeaderRowEnabled,
|
|
142
|
+
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
143
|
+
hoveredRows: hoveredRows,
|
|
144
|
+
stickyTop: tableActive ? stickyTop : undefined
|
|
145
|
+
}), /*#__PURE__*/React.createElement(RowControls, {
|
|
146
|
+
editorView: editorView,
|
|
147
|
+
tableRef: tableRef,
|
|
148
|
+
hoverRows: _hoverRows,
|
|
149
|
+
hoveredRows: hoveredRows,
|
|
150
|
+
isInDanger: isInDanger,
|
|
151
|
+
isResizing: isResizing,
|
|
152
|
+
selectRow: _selectRow,
|
|
153
|
+
stickyTop: tableActive ? stickyTop : undefined
|
|
154
|
+
})))))
|
|
155
|
+
);
|
|
152
156
|
};
|
|
153
157
|
export default TableFloatingControls;
|
|
@@ -6,7 +6,9 @@ export const DragHandleDisabledIcon = ({
|
|
|
6
6
|
height: "16",
|
|
7
7
|
viewBox: "0 0 24 16",
|
|
8
8
|
fill: "none",
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
11
|
+
,
|
|
10
12
|
style: style,
|
|
11
13
|
"data-testid": "drag-icon-disabled"
|
|
12
14
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
@@ -6,7 +6,9 @@ export const DragInMotionIcon = ({
|
|
|
6
6
|
height: "20",
|
|
7
7
|
viewBox: "0 0 28 20",
|
|
8
8
|
fill: "none",
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
11
|
+
,
|
|
10
12
|
style: style
|
|
11
13
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
12
14
|
x: "1",
|
|
@@ -6,6 +6,7 @@ export const MinimisedHandleIcon = () => /*#__PURE__*/React.createElement("svg",
|
|
|
6
6
|
height: "5",
|
|
7
7
|
fill: "none"
|
|
8
8
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
9
10
|
className: ClassName.DRAG_HANDLE_MINIMISED,
|
|
10
11
|
width: "24",
|
|
11
12
|
height: "5",
|
|
@@ -593,4 +593,14 @@ export var setTableAlignment = function setTableAlignment(newAlignment) {
|
|
|
593
593
|
tr.setNodeMarkup(tableObject.pos, undefined, nextTableAttrs).setMeta('scrollIntoView', false);
|
|
594
594
|
return tr;
|
|
595
595
|
};
|
|
596
|
+
};
|
|
597
|
+
export var setTableAlignmentWithTableContentWithPos = function setTableAlignmentWithTableContentWithPos(newAlignment, tableNodeWithPos) {
|
|
598
|
+
return function (_ref3) {
|
|
599
|
+
var tr = _ref3.tr;
|
|
600
|
+
var nextTableAttrs = _objectSpread(_objectSpread({}, tableNodeWithPos.node.attrs), {}, {
|
|
601
|
+
layout: newAlignment
|
|
602
|
+
});
|
|
603
|
+
tr.setNodeMarkup(tableNodeWithPos.pos, undefined, nextTableAttrs).setMeta('scrollIntoView', false);
|
|
604
|
+
return tr;
|
|
605
|
+
};
|
|
596
606
|
};
|
|
@@ -40,16 +40,20 @@ export var ExternalDropTargets = function ExternalDropTargets(_ref) {
|
|
|
40
40
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
style: {
|
|
42
42
|
width: getTableWrapperWidth(),
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
43
44
|
overflow: 'hidden',
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
44
46
|
position: 'absolute',
|
|
45
47
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
46
48
|
top: "-".concat(dropTargetExtendedWidth - tableMarginTop, "px"),
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
47
50
|
pointerEvents: 'auto',
|
|
48
51
|
zIndex: "".concat(dropTargetsZIndex)
|
|
49
52
|
},
|
|
50
53
|
"data-testid": "table-floating-column-extended-drop-targets"
|
|
51
54
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
55
|
style: {
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
53
57
|
display: 'flex',
|
|
54
58
|
// move drop targets based on table wrapper scroll
|
|
55
59
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -742,7 +742,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
742
742
|
var topStickyShadowPosition = isDragAndDropEnabled ? this.state.stickyHeader && this.state.stickyHeader.top + this.state.stickyHeader.padding + 2 : this.state.stickyHeader && this.state.stickyHeader.top + this.state.stickyHeader.padding + shadowPadding + 2;
|
|
743
743
|
var _getEditorFeatureFlag3 = getEditorFeatureFlags(),
|
|
744
744
|
stickyScrollbar = _getEditorFeatureFlag3.stickyScrollbar;
|
|
745
|
-
return /*#__PURE__*/React.createElement(TableContainer
|
|
745
|
+
return /*#__PURE__*/React.createElement(TableContainer
|
|
746
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
747
|
+
, {
|
|
746
748
|
className: classnames(ClassName.TABLE_CONTAINER, (_classnames = {}, _defineProperty(_classnames, ClassName.WITH_CONTROLS, allowControls && tableActive), _defineProperty(_classnames, ClassName.TABLE_STICKY, this.state.stickyHeader && hasHeaderRow), _defineProperty(_classnames, ClassName.HOVERED_DELETE_BUTTON, isInDanger), _defineProperty(_classnames, ClassName.TABLE_SELECTED, isTableSelected(view.state.selection)), _classnames)),
|
|
747
749
|
editorView: view,
|
|
748
750
|
getPos: getPos,
|
|
@@ -758,9 +760,11 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
758
760
|
isWholeTableInDanger: isWholeTableInDanger,
|
|
759
761
|
isTableAlignmentEnabled: isTableAlignmentEnabled
|
|
760
762
|
}, /*#__PURE__*/React.createElement("div", {
|
|
763
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
761
764
|
className: ClassName.TABLE_STICKY_SENTINEL_TOP,
|
|
762
765
|
"data-testid": "sticky-sentinel-top"
|
|
763
766
|
}), stickyScrollbar && /*#__PURE__*/React.createElement("div", {
|
|
767
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
764
768
|
className: ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP,
|
|
765
769
|
"data-testid": "sticky-scrollbar-sentinel-top"
|
|
766
770
|
}), allowControls && rowControls, isDragAndDropEnabled && /*#__PURE__*/React.createElement(ExternalDropTargets, {
|
|
@@ -775,10 +779,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
775
779
|
return ((_this4$wrapper3 = _this4.wrapper) === null || _this4$wrapper3 === void 0 ? void 0 : _this4$wrapper3.clientWidth) || 760;
|
|
776
780
|
}
|
|
777
781
|
}), /*#__PURE__*/React.createElement("div", {
|
|
778
|
-
contentEditable: false
|
|
779
|
-
style
|
|
782
|
+
contentEditable: false
|
|
783
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
784
|
+
,
|
|
785
|
+
style: shadowStyle(showBeforeShadow)
|
|
786
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
787
|
+
,
|
|
780
788
|
className: ClassName.TABLE_LEFT_SHADOW
|
|
781
789
|
}), this.state.stickyHeader && /*#__PURE__*/React.createElement("div", {
|
|
790
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
782
791
|
className: "".concat(ClassName.TABLE_LEFT_SHADOW, " ").concat(ClassName.TABLE_STICKY_SHADOW),
|
|
783
792
|
style: {
|
|
784
793
|
visibility: showBeforeShadow && hasHeaderRow ? 'visible' : 'hidden',
|
|
@@ -786,6 +795,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
786
795
|
paddingBottom: "".concat(isDragAndDropEnabled && "var(--ds-space-025, 2px)")
|
|
787
796
|
}
|
|
788
797
|
}), /*#__PURE__*/React.createElement("div", {
|
|
798
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
789
799
|
className: classnames(ClassName.TABLE_NODE_WRAPPER),
|
|
790
800
|
ref: function ref(elem) {
|
|
791
801
|
_this4.wrapper = elem;
|
|
@@ -800,10 +810,13 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
800
810
|
}
|
|
801
811
|
}
|
|
802
812
|
}, allowControls && colControls), stickyScrollbar && /*#__PURE__*/React.createElement("div", {
|
|
813
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
803
814
|
className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
|
|
804
815
|
style: {
|
|
816
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
805
817
|
height: "var(--ds-space-250, 20px)",
|
|
806
818
|
// MAX_BROWSER_SCROLLBAR_HEIGHT
|
|
819
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
807
820
|
display: 'none',
|
|
808
821
|
// prevent unwanted scroll during table resize without removing scrollbar container from the dom
|
|
809
822
|
width: isResizing ? "var(--ds-space-0, 0px)" : '100%'
|
|
@@ -811,18 +824,26 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
811
824
|
}, /*#__PURE__*/React.createElement("div", {
|
|
812
825
|
style: {
|
|
813
826
|
width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
|
|
827
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
814
828
|
height: '100%'
|
|
815
829
|
}
|
|
816
830
|
})), /*#__PURE__*/React.createElement("div", {
|
|
817
|
-
contentEditable: false
|
|
818
|
-
style
|
|
831
|
+
contentEditable: false
|
|
832
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
833
|
+
,
|
|
834
|
+
style: shadowStyle(showAfterShadow)
|
|
835
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
836
|
+
,
|
|
819
837
|
className: ClassName.TABLE_RIGHT_SHADOW
|
|
820
838
|
}), this.state.stickyHeader && /*#__PURE__*/React.createElement("div", {
|
|
821
839
|
style: {
|
|
840
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
822
841
|
position: 'absolute',
|
|
842
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
823
843
|
right: "var(--ds-space-400, 32px)" // tableOverflowShadowWidthWide
|
|
824
844
|
}
|
|
825
845
|
}, /*#__PURE__*/React.createElement("div", {
|
|
846
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
826
847
|
className: "".concat(ClassName.TABLE_RIGHT_SHADOW, " ").concat(ClassName.TABLE_STICKY_SHADOW),
|
|
827
848
|
style: {
|
|
828
849
|
visibility: showAfterShadow && hasHeaderRow ? 'visible' : 'hidden',
|
|
@@ -830,9 +851,11 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
830
851
|
paddingBottom: "".concat(isDragAndDropEnabled && "var(--ds-space-025, 2px)")
|
|
831
852
|
}
|
|
832
853
|
})), /*#__PURE__*/React.createElement("div", {
|
|
854
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
833
855
|
className: ClassName.TABLE_STICKY_SENTINEL_BOTTOM,
|
|
834
856
|
"data-testid": "sticky-sentinel-bottom"
|
|
835
857
|
}), stickyScrollbar && /*#__PURE__*/React.createElement("div", {
|
|
858
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
836
859
|
className: ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM,
|
|
837
860
|
"data-testid": "sticky-scrollbar-sentinel-bottom"
|
|
838
861
|
}));
|
|
@@ -13,8 +13,12 @@ export var InnerContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13
13
|
node = _ref.node,
|
|
14
14
|
children = _ref.children;
|
|
15
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
ref: ref
|
|
17
|
-
style
|
|
16
|
+
ref: ref
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
18
|
+
,
|
|
19
|
+
style: style
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
21
|
+
,
|
|
18
22
|
className: className,
|
|
19
23
|
"data-number-column": node.attrs.isNumberColumnEnabled,
|
|
20
24
|
"data-layout": node.attrs.layout,
|
|
@@ -36,10 +40,14 @@ var AlignmentTableContainer = function AlignmentTableContainer(_ref2) {
|
|
|
36
40
|
var style = useMemo(function () {
|
|
37
41
|
return alignment === 'align-start' ? leftAlignStyle : centerAlignStyle;
|
|
38
42
|
}, [alignment]);
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
style
|
|
42
|
-
|
|
43
|
+
return (
|
|
44
|
+
/*#__PURE__*/
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
46
|
+
React.createElement("div", {
|
|
47
|
+
"data-testid": "table-alignment-container",
|
|
48
|
+
style: style
|
|
49
|
+
}, children)
|
|
50
|
+
);
|
|
43
51
|
};
|
|
44
52
|
var AlignmentTableContainerWrapper = function AlignmentTableContainerWrapper(_ref3) {
|
|
45
53
|
var isTableAlignmentEnabled = _ref3.isTableAlignmentEnabled,
|
|
@@ -49,7 +57,9 @@ var AlignmentTableContainerWrapper = function AlignmentTableContainerWrapper(_re
|
|
|
49
57
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
58
|
"data-testid": "table-alignment-container",
|
|
51
59
|
style: {
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
52
61
|
display: 'flex',
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
53
63
|
justifyContent: 'center'
|
|
54
64
|
}
|
|
55
65
|
}, children);
|
|
@@ -63,6 +73,7 @@ export var ResizableTableContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
63
73
|
className = _ref4.className,
|
|
64
74
|
node = _ref4.node,
|
|
65
75
|
containerWidth = _ref4.containerWidth,
|
|
76
|
+
lineLength = _ref4.lineLength,
|
|
66
77
|
editorView = _ref4.editorView,
|
|
67
78
|
getPos = _ref4.getPos,
|
|
68
79
|
tableRef = _ref4.tableRef,
|
|
@@ -145,6 +156,7 @@ export var ResizableTableContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
145
156
|
width: width,
|
|
146
157
|
maxWidth: maxResizerWidth,
|
|
147
158
|
containerWidth: containerWidth,
|
|
159
|
+
lineLength: lineLength,
|
|
148
160
|
updateWidth: updateWidth,
|
|
149
161
|
editorView: editorView,
|
|
150
162
|
getPos: getPos,
|
|
@@ -169,12 +181,18 @@ export var ResizableTableContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
169
181
|
width: tableWidthRef.current,
|
|
170
182
|
height: resizing ? updateContainerHeight(tableWrapperHeight !== null && tableWrapperHeight !== void 0 ? tableWrapperHeight : 'auto') : 'auto',
|
|
171
183
|
position: isLivePageViewMode ? 'relative' : 'unset'
|
|
172
|
-
}
|
|
184
|
+
}
|
|
185
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
186
|
+
,
|
|
173
187
|
className: ClassName.TABLE_RESIZER_CONTAINER,
|
|
174
188
|
ref: containerRef
|
|
175
|
-
}, isLivePageViewMode ? /*#__PURE__*/React.createElement(InnerContainer
|
|
189
|
+
}, isLivePageViewMode ? /*#__PURE__*/React.createElement(InnerContainer
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
191
|
+
, {
|
|
176
192
|
className: className,
|
|
177
|
-
node: node
|
|
193
|
+
node: node
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
195
|
+
,
|
|
178
196
|
style: {
|
|
179
197
|
width: 'inherit'
|
|
180
198
|
}
|
|
@@ -187,7 +205,9 @@ export var TableContainer = function TableContainer(_ref5) {
|
|
|
187
205
|
var children = _ref5.children,
|
|
188
206
|
node = _ref5.node,
|
|
189
207
|
className = _ref5.className,
|
|
190
|
-
|
|
208
|
+
_ref5$containerWidth = _ref5.containerWidth,
|
|
209
|
+
editorWidth = _ref5$containerWidth.width,
|
|
210
|
+
lineLength = _ref5$containerWidth.lineLength,
|
|
191
211
|
editorView = _ref5.editorView,
|
|
192
212
|
getPos = _ref5.getPos,
|
|
193
213
|
tableRef = _ref5.tableRef,
|
|
@@ -200,10 +220,13 @@ export var TableContainer = function TableContainer(_ref5) {
|
|
|
200
220
|
isTableScalingEnabled = _ref5.isTableScalingEnabled,
|
|
201
221
|
isTableAlignmentEnabled = _ref5.isTableAlignmentEnabled;
|
|
202
222
|
if (isTableResizingEnabled && !isNested) {
|
|
203
|
-
return /*#__PURE__*/React.createElement(ResizableTableContainer
|
|
223
|
+
return /*#__PURE__*/React.createElement(ResizableTableContainer
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
225
|
+
, {
|
|
204
226
|
className: className,
|
|
205
227
|
node: node,
|
|
206
228
|
containerWidth: editorWidth,
|
|
229
|
+
lineLength: lineLength,
|
|
207
230
|
editorView: editorView,
|
|
208
231
|
getPos: getPos,
|
|
209
232
|
tableRef: tableRef,
|
|
@@ -216,11 +239,14 @@ export var TableContainer = function TableContainer(_ref5) {
|
|
|
216
239
|
}, children);
|
|
217
240
|
}
|
|
218
241
|
return /*#__PURE__*/React.createElement(InnerContainer, {
|
|
219
|
-
node: node
|
|
242
|
+
node: node
|
|
243
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
244
|
+
,
|
|
220
245
|
className: classNames(className, {
|
|
221
246
|
'less-padding': editorWidth < akEditorMobileBreakoutPoint && !isNested
|
|
222
247
|
}),
|
|
223
248
|
style: {
|
|
249
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
224
250
|
width: 'inherit'
|
|
225
251
|
}
|
|
226
252
|
}, children);
|