@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
|
@@ -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",
|
|
@@ -6,7 +6,10 @@ import { calculateDefaultSnappings, calculateDefaultTablePreserveSnappings } fro
|
|
|
6
6
|
// If we don't do this then the guidelines will not align correctly to the edge of the table
|
|
7
7
|
export var defaultGuidelines = createFixedGuidelinesFromLengths([0].concat(_toConsumableArray(calculateDefaultSnappings(-1))));
|
|
8
8
|
export var defaultGuidelinesForPreserveTable = function defaultGuidelinesForPreserveTable(editorContainerWidth) {
|
|
9
|
-
var
|
|
10
|
-
|
|
9
|
+
var exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
10
|
+
innerGuidelines: false,
|
|
11
|
+
breakoutPoints: false
|
|
12
|
+
};
|
|
13
|
+
var lengths = calculateDefaultTablePreserveSnappings(-1, editorContainerWidth, exclude);
|
|
11
14
|
return createFixedGuidelinesFromLengths(lengths, undefined, true);
|
|
12
15
|
};
|
|
@@ -12,24 +12,33 @@ export var calculateDefaultSnappings = function calculateDefaultSnappings() {
|
|
|
12
12
|
var lengthOffset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
13
13
|
return [].concat(_toConsumableArray(calculateSubSnappingWidths(numberOfLanesInDefaultLayoutWidth, akEditorDefaultLayoutWidth + lengthOffset)), [akEditorDefaultLayoutWidth + lengthOffset, akEditorCalculatedWideLayoutWidth + lengthOffset, akEditorFullWidthLayoutWidth + lengthOffset]);
|
|
14
14
|
};
|
|
15
|
-
|
|
16
15
|
// FF TablePreserve for calculateDefaultSnappings
|
|
17
16
|
export var calculateDefaultTablePreserveSnappings = function calculateDefaultTablePreserveSnappings() {
|
|
18
17
|
var lengthOffset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
19
18
|
var editorContainerWith = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : akEditorFullWidthLayoutWidth;
|
|
20
|
-
var
|
|
19
|
+
var exclude = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
20
|
+
innerGuidelines: false,
|
|
21
|
+
breakoutPoints: false
|
|
22
|
+
};
|
|
21
23
|
var dynamicFullWidthLine = editorContainerWith - akEditorGutterPadding * 2 >= akEditorFullWidthLayoutWidth ? akEditorFullWidthLayoutWidth : editorContainerWith - akEditorGutterPadding * 2 - tableResizerWidth;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
var guides = [dynamicFullWidthLine - lengthOffset];
|
|
25
|
+
if (!exclude.breakoutPoints) {
|
|
26
|
+
guides.unshift(akEditorDefaultLayoutWidth + lengthOffset, akEditorCalculatedWideLayoutWidth + lengthOffset);
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
if (!exclude.innerGuidelines) {
|
|
29
|
+
guides.unshift.apply(guides, [0].concat(_toConsumableArray(calculateSubSnappingWidths(numberOfLanesInDefaultLayoutWidth, akEditorDefaultLayoutWidth + lengthOffset))));
|
|
30
|
+
}
|
|
31
|
+
return guides;
|
|
26
32
|
};
|
|
27
33
|
export var defaultSnappingWidths = calculateDefaultSnappings();
|
|
28
34
|
|
|
29
35
|
// FF TablePreserve for defaultSnappingWidths
|
|
30
36
|
export var defaultTablePreserveSnappingWidths = function defaultTablePreserveSnappingWidths(editorContainerWidth) {
|
|
31
|
-
var
|
|
32
|
-
|
|
37
|
+
var exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
38
|
+
innerGuidelines: false,
|
|
39
|
+
breakoutPoints: false
|
|
40
|
+
};
|
|
41
|
+
return editorContainerWidth - akEditorGutterPadding * 2 > akEditorFullWidthLayoutWidth ? calculateDefaultSnappings() : calculateDefaultTablePreserveSnappings(0, editorContainerWidth, exclude);
|
|
33
42
|
};
|
|
34
43
|
|
|
35
44
|
/**
|
package/dist/types/toolbar.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ type AlignmentIcon = {
|
|
|
19
19
|
value: AlignmentOptions;
|
|
20
20
|
icon: React.ComponentClass<any>;
|
|
21
21
|
};
|
|
22
|
-
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Array<FloatingToolbarDropdown<Command>>;
|
|
22
|
+
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorContainerWidth: GetEditorContainerWidth) => Array<FloatingToolbarDropdown<Command>>;
|
|
23
23
|
export declare const getSelectedAlignmentIcon: (alignmentIcons: AlignmentIcon[], selectedNode: PMNode) => AlignmentIcon | undefined;
|
|
24
|
+
export declare const isLayoutOptionDisabled: (selectedNode: PMNode, getEditorContainerWidth: GetEditorContainerWidth) => boolean;
|
|
24
25
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
|
+
import type { GuidelineExcludeConfig } from './snapping';
|
|
2
3
|
export declare const defaultGuidelines: GuidelineConfig[];
|
|
3
|
-
export declare const defaultGuidelinesForPreserveTable: (editorContainerWidth: number,
|
|
4
|
+
export declare const defaultGuidelinesForPreserveTable: (editorContainerWidth: number, exclude?: GuidelineExcludeConfig) => GuidelineConfig[];
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
2
|
export declare const calculateDefaultSnappings: (lengthOffset?: number) => number[];
|
|
3
|
-
export
|
|
3
|
+
export type GuidelineExcludeConfig = {
|
|
4
|
+
innerGuidelines: boolean;
|
|
5
|
+
breakoutPoints: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const calculateDefaultTablePreserveSnappings: (lengthOffset?: number, editorContainerWith?: number, exclude?: GuidelineExcludeConfig) => number[];
|
|
4
8
|
export declare const defaultSnappingWidths: number[];
|
|
5
|
-
export declare const defaultTablePreserveSnappingWidths: (editorContainerWidth: number,
|
|
9
|
+
export declare const defaultTablePreserveSnappingWidths: (editorContainerWidth: number, exclude?: GuidelineExcludeConfig) => number[];
|
|
6
10
|
/**
|
|
7
11
|
* Returns keys of guidelines that are closest to the table and withthin the snapGap
|
|
8
12
|
*/
|
|
@@ -19,6 +19,7 @@ type AlignmentIcon = {
|
|
|
19
19
|
value: AlignmentOptions;
|
|
20
20
|
icon: React.ComponentClass<any>;
|
|
21
21
|
};
|
|
22
|
-
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => Array<FloatingToolbarDropdown<Command>>;
|
|
22
|
+
export declare const getAlignmentOptionsConfig: (editorState: EditorState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorContainerWidth: GetEditorContainerWidth) => Array<FloatingToolbarDropdown<Command>>;
|
|
23
23
|
export declare const getSelectedAlignmentIcon: (alignmentIcons: AlignmentIcon[], selectedNode: PMNode) => AlignmentIcon | undefined;
|
|
24
|
+
export declare const isLayoutOptionDisabled: (selectedNode: PMNode, getEditorContainerWidth: GetEditorContainerWidth) => boolean;
|
|
24
25
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
|
+
import type { GuidelineExcludeConfig } from './snapping';
|
|
2
3
|
export declare const defaultGuidelines: GuidelineConfig[];
|
|
3
|
-
export declare const defaultGuidelinesForPreserveTable: (editorContainerWidth: number,
|
|
4
|
+
export declare const defaultGuidelinesForPreserveTable: (editorContainerWidth: number, exclude?: GuidelineExcludeConfig) => GuidelineConfig[];
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
2
|
export declare const calculateDefaultSnappings: (lengthOffset?: number) => number[];
|
|
3
|
-
export
|
|
3
|
+
export type GuidelineExcludeConfig = {
|
|
4
|
+
innerGuidelines: boolean;
|
|
5
|
+
breakoutPoints: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const calculateDefaultTablePreserveSnappings: (lengthOffset?: number, editorContainerWith?: number, exclude?: GuidelineExcludeConfig) => number[];
|
|
4
8
|
export declare const defaultSnappingWidths: number[];
|
|
5
|
-
export declare const defaultTablePreserveSnappingWidths: (editorContainerWidth: number,
|
|
9
|
+
export declare const defaultTablePreserveSnappingWidths: (editorContainerWidth: number, exclude?: GuidelineExcludeConfig) => number[];
|
|
6
10
|
/**
|
|
7
11
|
* Returns keys of guidelines that are closest to the table and withthin the snapGap
|
|
8
12
|
*/
|