@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
|
@@ -129,14 +129,23 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
129
129
|
key: type,
|
|
130
130
|
style: {
|
|
131
131
|
gridColumn: gridColumn,
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
132
133
|
gridRow: '1',
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
133
135
|
display: 'flex',
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
134
137
|
justifyContent: 'center',
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
135
139
|
alignItems: 'center',
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
136
141
|
height: 'fit-content',
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
137
143
|
placeSelf: 'center',
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
138
145
|
zIndex: 99,
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
139
147
|
width: '100%',
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
140
149
|
position: 'relative'
|
|
141
150
|
},
|
|
142
151
|
"data-testid": "table-floating-column-".concat(isHover ? colIndex : isPlaceholder ? appearance : selectedColIndexes[0], "-drag-handle")
|
|
@@ -178,15 +187,19 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
178
187
|
};
|
|
179
188
|
var containerWidth = isNumberColumnEnabled && tableContainerWidth ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth;
|
|
180
189
|
return /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
181
191
|
className: ClassName.DRAG_COLUMN_CONTROLS,
|
|
182
192
|
onMouseMove: handleMouseMove
|
|
183
193
|
}, /*#__PURE__*/React.createElement("div", {
|
|
184
|
-
ref: columnControlsRef
|
|
194
|
+
ref: columnControlsRef
|
|
195
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
196
|
+
,
|
|
185
197
|
className: ClassName.DRAG_COLUMN_CONTROLS_INNER,
|
|
186
198
|
"data-testid": "table-floating-column-controls",
|
|
187
199
|
style: {
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
188
201
|
gridTemplateColumns: widths,
|
|
189
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
202
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
190
203
|
marginTop: marginTop,
|
|
191
204
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
192
205
|
width: stickyTop ? containerWidth : undefined,
|
|
@@ -201,12 +214,17 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
201
214
|
gridColumn: "".concat(startIndex + 1, " / span 1")
|
|
202
215
|
},
|
|
203
216
|
"data-start-index": startIndex,
|
|
204
|
-
"data-end-index": endIndex
|
|
217
|
+
"data-end-index": endIndex
|
|
218
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
219
|
+
,
|
|
205
220
|
className: ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER,
|
|
206
221
|
contentEditable: false,
|
|
207
222
|
key: index
|
|
208
223
|
}, /*#__PURE__*/React.createElement("div", {
|
|
209
|
-
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
225
|
+
className: ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
227
|
+
,
|
|
210
228
|
style: columnParams.length - 1 === index ? {
|
|
211
229
|
right: '0'
|
|
212
230
|
} : {}
|
|
@@ -80,7 +80,9 @@ export var ColumnDropTarget = function ColumnDropTarget(_ref) {
|
|
|
80
80
|
height: height && "".concat(height, "px"),
|
|
81
81
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
82
82
|
marginTop: marginTop && "".concat(marginTop, "px"),
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
83
84
|
pointerEvents: 'auto',
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
84
86
|
flexShrink: 0
|
|
85
87
|
},
|
|
86
88
|
"data-drop-target-index": index,
|
|
@@ -17,10 +17,13 @@ export var ColumnDropTargets = function ColumnDropTargets(_ref) {
|
|
|
17
17
|
dropTargetRef.current.style.marginLeft = "-".concat((_getScrollOffset = getScrollOffset === null || getScrollOffset === void 0 ? void 0 : getScrollOffset()) !== null && _getScrollOffset !== void 0 ? _getScrollOffset : 0, "px");
|
|
18
18
|
}
|
|
19
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
ref: dropTargetRef
|
|
20
|
+
ref: dropTargetRef
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
22
|
+
,
|
|
21
23
|
className: ClassName.DRAG_COLUMN_DROP_TARGET_CONTROLS,
|
|
22
24
|
contentEditable: false
|
|
23
25
|
}, /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
24
27
|
className: ClassName.DRAG_COLUMN_CONTROLS_INNER,
|
|
25
28
|
"data-testid": "table-floating-column-controls-drop-targets"
|
|
26
29
|
}, colWidths === null || colWidths === void 0 ? void 0 : colWidths.map(function (width, index) {
|
|
@@ -71,7 +71,9 @@ export var TableFloatingColumnControls = function TableFloatingColumnControls(_r
|
|
|
71
71
|
containerRef === null || containerRef === void 0 || (_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 || _containerRef$current2.style.removeProperty('top');
|
|
72
72
|
}
|
|
73
73
|
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
ref: containerRef
|
|
74
|
+
ref: containerRef
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
76
|
+
,
|
|
75
77
|
className: ClassName.DRAG_COLUMN_CONTROLS_WRAPPER,
|
|
76
78
|
"data-testid": "table-floating-column-controls-wrapper"
|
|
77
79
|
}, /*#__PURE__*/React.createElement(ColumnControls, {
|
|
@@ -71,6 +71,7 @@ var CornerControlComponent = /*#__PURE__*/function (_Component) {
|
|
|
71
71
|
}
|
|
72
72
|
var isActive = this.isActive();
|
|
73
73
|
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
74
75
|
className: classnames(ClassName.CORNER_CONTROLS, {
|
|
75
76
|
active: isActive,
|
|
76
77
|
sticky: this.props.stickyTop !== undefined
|
|
@@ -82,18 +83,26 @@ var CornerControlComponent = /*#__PURE__*/function (_Component) {
|
|
|
82
83
|
contentEditable: false
|
|
83
84
|
}, /*#__PURE__*/React.createElement("button", {
|
|
84
85
|
"aria-label": formatMessage(messages.cornerControl),
|
|
85
|
-
type: "button"
|
|
86
|
+
type: "button"
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
88
|
+
,
|
|
86
89
|
className: classnames(ClassName.CONTROLS_CORNER_BUTTON, {
|
|
87
90
|
danger: isActive && isInDanger
|
|
88
91
|
}),
|
|
89
92
|
onClick: this.selectTable,
|
|
90
93
|
onMouseOver: this.hoverTable,
|
|
91
94
|
onMouseOut: this.clearHoverSelection
|
|
92
|
-
}), !isHeaderRowEnabled &&
|
|
95
|
+
}), !isHeaderRowEnabled &&
|
|
96
|
+
/*#__PURE__*/
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
98
|
+
React.createElement("div", {
|
|
93
99
|
className: ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER
|
|
94
100
|
}, /*#__PURE__*/React.createElement("div", {
|
|
95
101
|
className: ClassName.CONTROLS_INSERT_MARKER
|
|
96
|
-
})), !isHeaderColumnEnabled &&
|
|
102
|
+
})), !isHeaderColumnEnabled &&
|
|
103
|
+
/*#__PURE__*/
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
105
|
+
React.createElement("div", {
|
|
97
106
|
className: ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER
|
|
98
107
|
}, /*#__PURE__*/React.createElement("div", {
|
|
99
108
|
className: ClassName.CONTROLS_INSERT_MARKER
|
|
@@ -33,6 +33,7 @@ var DragCornerControlsComponent = function DragCornerControlsComponent(_ref) {
|
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
35
|
return /*#__PURE__*/React.createElement("button", {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
36
37
|
className: classnames(ClassName.DRAG_CORNER_BUTTON, {
|
|
37
38
|
active: isActive,
|
|
38
39
|
danger: isActive && isInDanger
|
|
@@ -78,6 +79,7 @@ var DragCornerControlsComponentWithSelection = function DragCornerControlsCompon
|
|
|
78
79
|
return null;
|
|
79
80
|
}
|
|
80
81
|
return /*#__PURE__*/React.createElement("button", {
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
81
83
|
className: classnames(ClassName.DRAG_CORNER_BUTTON, {
|
|
82
84
|
active: isActive,
|
|
83
85
|
danger: isActive && isInDanger
|
|
@@ -100,6 +100,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
100
100
|
updateCellHoverLocation = _this$props5.updateCellHoverLocation;
|
|
101
101
|
var rowHeights = getRowHeights(tableRef);
|
|
102
102
|
return /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
103
104
|
className: ClassName.NUMBERED_COLUMN,
|
|
104
105
|
style: {
|
|
105
106
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -109,17 +110,25 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
109
110
|
contentEditable: false
|
|
110
111
|
}, rowHeights.map(function (rowHeight, index) {
|
|
111
112
|
return isDragAndDropEnabled ? /*#__PURE__*/React.createElement("div", {
|
|
112
|
-
key: "wrapper-".concat(index)
|
|
113
|
+
key: "wrapper-".concat(index)
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
115
|
+
,
|
|
113
116
|
className: _this2.getClassNames(index, true),
|
|
114
|
-
"data-index": index
|
|
117
|
+
"data-index": index
|
|
118
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
119
|
+
,
|
|
115
120
|
style: _this2.getCellStyles(index, rowHeight),
|
|
116
121
|
onMouseOver: function onMouseOver() {
|
|
117
122
|
return updateCellHoverLocation(index);
|
|
118
123
|
}
|
|
119
124
|
}, hasHeaderRow ? index > 0 ? index : null : index + 1) : /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
key: "wrapper-".concat(index)
|
|
125
|
+
key: "wrapper-".concat(index)
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
127
|
+
,
|
|
121
128
|
className: _this2.getClassNames(index),
|
|
122
|
-
"data-index": index
|
|
129
|
+
"data-index": index
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
131
|
+
,
|
|
123
132
|
style: _this2.getCellStyles(index, rowHeight),
|
|
124
133
|
onClick: function onClick(event) {
|
|
125
134
|
return _this2.selectRow(index, event);
|
|
@@ -52,50 +52,57 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
|
52
52
|
var rowsParams = getRowsParams(rowHeights);
|
|
53
53
|
var firstRow = tableRef.querySelector('tr');
|
|
54
54
|
var hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
className: "".concat(ClassName.ROW_CONTROLS_BUTTON_WRAP, " ").concat(getRowClassNames(startIndex, selectionState || selection, hoveredRows, isInDanger, isResizing), " ").concat(thisRowSticky ? 'sticky' : ''),
|
|
71
|
-
key: startIndex,
|
|
72
|
-
style: {
|
|
73
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
74
|
-
height: height,
|
|
75
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
76
|
-
marginTop: "".concat(marginTop, "px"),
|
|
77
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
78
|
-
top: thisRowSticky ? "".concat(_this2.props.stickyTop + 3, "px") : undefined,
|
|
79
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
80
|
-
paddingTop: thisRowSticky ? "".concat(tableControlsSpacing, "px") : undefined
|
|
55
|
+
return (
|
|
56
|
+
/*#__PURE__*/
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
58
|
+
React.createElement("div", {
|
|
59
|
+
className: ClassName.ROW_CONTROLS
|
|
60
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: ClassName.ROW_CONTROLS_INNER
|
|
62
|
+
}, rowsParams.map(function (_ref, index) {
|
|
63
|
+
var startIndex = _ref.startIndex,
|
|
64
|
+
endIndex = _ref.endIndex,
|
|
65
|
+
height = _ref.height;
|
|
66
|
+
// if previous row was header row, add its height to our margin
|
|
67
|
+
var marginTop = -1;
|
|
68
|
+
if (index === 1 && hasHeaderRow && _this2.props.stickyTop !== undefined) {
|
|
69
|
+
marginTop += rowHeights[index - 1] + tableToolbarSize;
|
|
81
70
|
}
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
71
|
+
var thisRowSticky = _this2.props.stickyTop !== undefined && index === 0 && hasHeaderRow;
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
74
|
+
className: "".concat(ClassName.ROW_CONTROLS_BUTTON_WRAP, " ").concat(getRowClassNames(startIndex, selectionState || selection, hoveredRows, isInDanger, isResizing), " ").concat(thisRowSticky ? 'sticky' : ''),
|
|
75
|
+
key: startIndex,
|
|
76
|
+
style: {
|
|
77
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
78
|
+
height: height,
|
|
79
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
80
|
+
marginTop: "".concat(marginTop, "px"),
|
|
81
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
82
|
+
top: thisRowSticky ? "".concat(_this2.props.stickyTop + 3, "px") : undefined,
|
|
83
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
84
|
+
paddingTop: thisRowSticky ? "".concat(tableControlsSpacing, "px") : undefined
|
|
85
|
+
}
|
|
86
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
87
|
+
"aria-label": formatMessage(messages.rowControl),
|
|
88
|
+
type: "button"
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
90
|
+
,
|
|
91
|
+
className: "".concat(ClassName.ROW_CONTROLS_BUTTON, " ").concat(ClassName.CONTROLS_BUTTON),
|
|
92
|
+
onClick: function onClick(event) {
|
|
93
|
+
return _this2.props.selectRow(startIndex, event.shiftKey);
|
|
94
|
+
},
|
|
95
|
+
onMouseOver: function onMouseOver() {
|
|
96
|
+
return _this2.props.hoverRows([startIndex]);
|
|
97
|
+
},
|
|
98
|
+
onMouseOut: _this2.clearHoverSelection,
|
|
99
|
+
"data-start-index": startIndex,
|
|
100
|
+
"data-end-index": endIndex
|
|
101
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
className: ClassName.CONTROLS_INSERT_MARKER
|
|
103
|
+
}));
|
|
104
|
+
})))
|
|
105
|
+
);
|
|
99
106
|
}
|
|
100
107
|
}]);
|
|
101
108
|
return RowControlsComponent;
|
|
@@ -136,13 +136,18 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
136
136
|
key: type,
|
|
137
137
|
style: {
|
|
138
138
|
gridRow: gridRow,
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
139
140
|
gridColumn: '2',
|
|
140
141
|
// 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
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
141
143
|
display: 'flex',
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
142
145
|
width: '9px',
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
143
147
|
height: '100%',
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
144
149
|
position: 'relative',
|
|
145
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
150
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
146
151
|
right: '-0.5px'
|
|
147
152
|
},
|
|
148
153
|
"data-testid": "table-floating-row-".concat(isHover ? rowIndex : selectedRowIndexes[0], "-drag-handle")
|
|
@@ -183,6 +188,7 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
183
188
|
return null;
|
|
184
189
|
}
|
|
185
190
|
return /*#__PURE__*/React.createElement("div", {
|
|
191
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
186
192
|
className: ClassName.DRAG_ROW_CONTROLS,
|
|
187
193
|
style: {
|
|
188
194
|
gridTemplateRows: heights,
|
|
@@ -200,10 +206,13 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
200
206
|
}, /*#__PURE__*/React.createElement("div", {
|
|
201
207
|
style: {
|
|
202
208
|
gridRow: "".concat(index + 1, " / span 1"),
|
|
209
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
203
210
|
gridColumn: '2'
|
|
204
211
|
},
|
|
205
212
|
"data-start-index": startIndex,
|
|
206
|
-
"data-end-index": endIndex
|
|
213
|
+
"data-end-index": endIndex
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
215
|
+
,
|
|
207
216
|
className: ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER,
|
|
208
217
|
contentEditable: false,
|
|
209
218
|
key: "insert-dot-".concat(index)
|
|
@@ -214,11 +223,16 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
214
223
|
index: index,
|
|
215
224
|
localId: currentNodeLocalId,
|
|
216
225
|
style: {
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
217
227
|
gridColumn: '1 / span 3',
|
|
218
228
|
gridRow: "".concat(index + 1, " / span 1"),
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
219
230
|
height: '100%',
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
220
232
|
pointerEvents: 'auto',
|
|
233
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
221
234
|
position: 'relative',
|
|
235
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
222
236
|
left: "var(--ds-space-negative-100, -8px)"
|
|
223
237
|
}
|
|
224
238
|
}));
|
|
@@ -70,7 +70,9 @@ var RowDropTarget = function RowDropTarget(_ref) {
|
|
|
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,
|
|
@@ -66,81 +66,85 @@ export var TableFloatingControls = function TableFloatingControls(_ref) {
|
|
|
66
66
|
}
|
|
67
67
|
var stickyTop = stickyHeader && stickyHeader.sticky && hasHeaderRow ? stickyHeader.top : undefined;
|
|
68
68
|
var wrapperClassName = isDragAndDropEnabled ? ClassName.DRAG_ROW_CONTROLS_WRAPPER : ClassName.ROW_CONTROLS_WRAPPER;
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
69
|
+
return (
|
|
70
|
+
/*#__PURE__*/
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
72
|
+
React.createElement("div", {
|
|
73
|
+
className: wrapperClassName
|
|
74
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
onMouseDown: function onMouseDown(e) {
|
|
76
|
+
return !isDragAndDropEnabled && e.preventDefault();
|
|
77
|
+
}
|
|
78
|
+
}, isNumberColumnEnabled ? /*#__PURE__*/React.createElement(NumberColumn, {
|
|
79
|
+
editorView: editorView,
|
|
80
|
+
hoverRows: _hoverRows,
|
|
81
|
+
tableRef: tableRef,
|
|
82
|
+
tableActive: tableActive,
|
|
83
|
+
hoveredRows: hoveredRows,
|
|
84
|
+
hasHeaderRow: hasHeaderRow,
|
|
85
|
+
isInDanger: isInDanger,
|
|
86
|
+
isResizing: isResizing,
|
|
87
|
+
selectRow: _selectRow,
|
|
88
|
+
updateCellHoverLocation: updateCellHoverLocation,
|
|
89
|
+
stickyTop: stickyTop,
|
|
90
|
+
isDragAndDropEnabled: isDragAndDropEnabled
|
|
91
|
+
}) : 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, {
|
|
92
|
+
editorView: editorView,
|
|
93
|
+
tableRef: tableRef,
|
|
94
|
+
isInDanger: isInDanger,
|
|
95
|
+
isResizing: isResizing,
|
|
96
|
+
api: api
|
|
97
|
+
}) : /*#__PURE__*/React.createElement(DragCornerControls, {
|
|
98
|
+
editorView: editorView,
|
|
99
|
+
tableRef: tableRef,
|
|
100
|
+
isInDanger: isInDanger,
|
|
101
|
+
isResizing: isResizing
|
|
102
|
+
}), /*#__PURE__*/React.createElement(DragControls, {
|
|
103
|
+
tableRef: tableRef,
|
|
104
|
+
tableNode: tableNode,
|
|
105
|
+
hoveredCell: hoveredCell,
|
|
106
|
+
isTableHovered: isTableHovered,
|
|
107
|
+
editorView: editorView,
|
|
108
|
+
tableActive: tableActive,
|
|
109
|
+
isInDanger: isInDanger,
|
|
110
|
+
isResizing: isResizing,
|
|
111
|
+
tableWidth: tableWrapperWidth,
|
|
112
|
+
hoverRows: _hoverRows,
|
|
113
|
+
selectRow: _selectRow,
|
|
114
|
+
selectRows: _selectRows,
|
|
115
|
+
updateCellHoverLocation: updateCellHoverLocation
|
|
116
|
+
})) : getBooleanFF('platform.editor.table.use-shared-state-hook') ? /*#__PURE__*/React.createElement(FloatingControlsWithSelection, {
|
|
117
|
+
editorView: editorView,
|
|
118
|
+
tableRef: tableRef,
|
|
119
|
+
isInDanger: isInDanger,
|
|
120
|
+
isResizing: isResizing,
|
|
121
|
+
isHeaderRowEnabled: isHeaderRowEnabled,
|
|
122
|
+
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
123
|
+
hoveredRows: hoveredRows,
|
|
124
|
+
stickyTop: tableActive ? stickyTop : undefined,
|
|
125
|
+
tableActive: tableActive,
|
|
126
|
+
hoverRows: _hoverRows,
|
|
127
|
+
selectRow: _selectRow,
|
|
128
|
+
api: api
|
|
129
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
|
|
130
|
+
editorView: editorView,
|
|
131
|
+
tableRef: tableRef,
|
|
132
|
+
isInDanger: isInDanger,
|
|
133
|
+
isResizing: isResizing,
|
|
134
|
+
isHeaderRowEnabled: isHeaderRowEnabled,
|
|
135
|
+
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
136
|
+
hoveredRows: hoveredRows,
|
|
137
|
+
stickyTop: tableActive ? stickyTop : undefined
|
|
138
|
+
}), /*#__PURE__*/React.createElement(RowControls, {
|
|
139
|
+
editorView: editorView,
|
|
140
|
+
tableRef: tableRef,
|
|
141
|
+
hoverRows: _hoverRows,
|
|
142
|
+
hoveredRows: hoveredRows,
|
|
143
|
+
isInDanger: isInDanger,
|
|
144
|
+
isResizing: isResizing,
|
|
145
|
+
selectRow: _selectRow,
|
|
146
|
+
stickyTop: tableActive ? stickyTop : undefined
|
|
147
|
+
})))))
|
|
148
|
+
);
|
|
145
149
|
};
|
|
146
150
|
export default TableFloatingControls;
|
|
@@ -6,7 +6,9 @@ export var DragHandleDisabledIcon = function DragHandleDisabledIcon(_ref) {
|
|
|
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 var DragInMotionIcon = function DragInMotionIcon(_ref) {
|
|
|
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",
|
|
@@ -7,6 +7,7 @@ export var MinimisedHandleIcon = function MinimisedHandleIcon() {
|
|
|
7
7
|
height: "5",
|
|
8
8
|
fill: "none"
|
|
9
9
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
10
11
|
className: ClassName.DRAG_HANDLE_MINIMISED,
|
|
11
12
|
width: "24",
|
|
12
13
|
height: "5",
|
|
@@ -2,7 +2,7 @@ import type { TableLayout } from '@atlaskit/adf-schema';
|
|
|
2
2
|
import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
+
import type { ContentNodeWithPos, NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { WidthToWidest } from '../types';
|
|
8
8
|
export declare const setEditorFocus: (editorHasFocus: boolean) => Command;
|
|
@@ -37,3 +37,4 @@ export declare const autoSizeTable: (view: EditorView, node: PMNode, table: HTML
|
|
|
37
37
|
export declare const addBoldInEmptyHeaderCells: (tableCellHeader: ContentNodeWithPos) => Command;
|
|
38
38
|
export declare const updateWidthToWidest: (widthToWidest: WidthToWidest) => Command;
|
|
39
39
|
export declare const setTableAlignment: (newAlignment: TableLayout) => EditorCommand;
|
|
40
|
+
export declare const setTableAlignmentWithTableContentWithPos: (newAlignment: TableLayout, tableNodeWithPos: NodeWithPos) => EditorCommand;
|
|
@@ -17,6 +17,7 @@ export declare const InnerContainer: React.ForwardRefExoticComponent<InnerContai
|
|
|
17
17
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
type ResizableTableContainerProps = {
|
|
19
19
|
containerWidth: number;
|
|
20
|
+
lineLength: number;
|
|
20
21
|
node: PMNode;
|
|
21
22
|
className: string;
|
|
22
23
|
editorView: EditorView;
|
|
@@ -29,7 +30,7 @@ type ResizableTableContainerProps = {
|
|
|
29
30
|
isTableScalingEnabled?: boolean;
|
|
30
31
|
isTableAlignmentEnabled?: boolean;
|
|
31
32
|
};
|
|
32
|
-
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
|
|
33
|
+
export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
|
|
33
34
|
type TableContainerProps = {
|
|
34
35
|
node: PMNode;
|
|
35
36
|
className: string;
|
|
@@ -46,5 +47,5 @@ type TableContainerProps = {
|
|
|
46
47
|
isTableScalingEnabled?: boolean;
|
|
47
48
|
isTableAlignmentEnabled?: boolean;
|
|
48
49
|
};
|
|
49
|
-
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
|
|
50
|
+
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableAlignmentEnabled, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
|
|
50
51
|
export {};
|