@atlaskit/editor-plugin-table 5.3.1 → 5.3.3
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 +12 -0
- package/dist/cjs/plugins/table/commands/hover.js +17 -8
- package/dist/cjs/plugins/table/commands/index.js +6 -0
- package/dist/cjs/plugins/table/commands/misc.js +1 -7
- package/dist/cjs/plugins/table/event-handlers.js +29 -2
- package/dist/cjs/plugins/table/index.js +1 -1
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +5 -3
- package/dist/cjs/plugins/table/nodeviews/table.js +4 -2
- package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +7 -3
- package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-controls.js +7 -2
- package/dist/cjs/plugins/table/pm-plugins/default-table-selection.js +14 -1
- package/dist/cjs/plugins/table/pm-plugins/main.js +5 -5
- package/dist/cjs/plugins/table/reducer.js +2 -1
- package/dist/cjs/plugins/table/types.js +6 -0
- package/dist/cjs/plugins/table/ui/DragHandle/index.js +50 -0
- package/dist/cjs/plugins/table/ui/DragPreview/index.js +39 -0
- package/dist/cjs/plugins/table/ui/Icons/DragInMotionIcon.js +55 -0
- package/dist/cjs/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +53 -14
- package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/ClassicControls.js +114 -0
- package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +53 -0
- package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/index.js +11 -106
- package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +16 -6
- package/dist/cjs/plugins/table/ui/common-styles.js +9 -6
- package/dist/cjs/plugins/table/ui/consts.js +2 -1
- package/dist/cjs/plugins/table/ui/ui-styles.js +18 -9
- package/dist/cjs/plugins/table/utils/decoration.js +44 -18
- package/dist/cjs/plugins/table/utils/dom.js +7 -1
- package/dist/cjs/plugins/table/utils/index.js +12 -0
- package/dist/es2019/plugins/table/commands/hover.js +12 -8
- package/dist/es2019/plugins/table/commands/index.js +1 -1
- package/dist/es2019/plugins/table/commands/misc.js +1 -7
- package/dist/es2019/plugins/table/event-handlers.js +28 -2
- package/dist/es2019/plugins/table/index.js +1 -1
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +5 -3
- package/dist/es2019/plugins/table/nodeviews/table.js +4 -2
- package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +8 -6
- package/dist/es2019/plugins/table/pm-plugins/decorations/utils/column-controls.js +7 -2
- package/dist/es2019/plugins/table/pm-plugins/default-table-selection.js +13 -0
- package/dist/es2019/plugins/table/pm-plugins/main.js +6 -5
- package/dist/es2019/plugins/table/reducer.js +2 -1
- package/dist/es2019/plugins/table/types.js +6 -0
- package/dist/es2019/plugins/table/ui/DragHandle/index.js +41 -0
- package/dist/es2019/plugins/table/ui/DragPreview/index.js +33 -0
- package/dist/es2019/plugins/table/ui/Icons/DragInMotionIcon.js +47 -0
- package/dist/es2019/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +54 -10
- package/dist/es2019/plugins/table/ui/TableFloatingControls/RowControls/ClassicControls.js +86 -0
- package/dist/es2019/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +43 -0
- package/dist/es2019/plugins/table/ui/TableFloatingControls/RowControls/index.js +2 -88
- package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +17 -7
- package/dist/es2019/plugins/table/ui/common-styles.js +47 -12
- package/dist/es2019/plugins/table/ui/consts.js +1 -0
- package/dist/es2019/plugins/table/ui/ui-styles.js +57 -14
- package/dist/es2019/plugins/table/utils/decoration.js +44 -18
- package/dist/es2019/plugins/table/utils/dom.js +2 -0
- package/dist/es2019/plugins/table/utils/index.js +1 -1
- package/dist/esm/plugins/table/commands/hover.js +16 -8
- package/dist/esm/plugins/table/commands/index.js +1 -1
- package/dist/esm/plugins/table/commands/misc.js +1 -7
- package/dist/esm/plugins/table/event-handlers.js +29 -2
- package/dist/esm/plugins/table/index.js +1 -1
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +5 -3
- package/dist/esm/plugins/table/nodeviews/table.js +4 -2
- package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +8 -6
- package/dist/esm/plugins/table/pm-plugins/decorations/utils/column-controls.js +7 -2
- package/dist/esm/plugins/table/pm-plugins/default-table-selection.js +13 -0
- package/dist/esm/plugins/table/pm-plugins/main.js +7 -7
- package/dist/esm/plugins/table/reducer.js +2 -1
- package/dist/esm/plugins/table/types.js +6 -0
- package/dist/esm/plugins/table/ui/DragHandle/index.js +41 -0
- package/dist/esm/plugins/table/ui/DragPreview/index.js +32 -0
- package/dist/esm/plugins/table/ui/Icons/DragInMotionIcon.js +48 -0
- package/dist/esm/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +54 -15
- package/dist/esm/plugins/table/ui/TableFloatingControls/RowControls/ClassicControls.js +104 -0
- package/dist/esm/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +46 -0
- package/dist/esm/plugins/table/ui/TableFloatingControls/RowControls/index.js +2 -104
- package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +17 -7
- package/dist/esm/plugins/table/ui/common-styles.js +10 -7
- package/dist/esm/plugins/table/ui/consts.js +1 -0
- package/dist/esm/plugins/table/ui/ui-styles.js +18 -9
- package/dist/esm/plugins/table/utils/decoration.js +44 -18
- package/dist/esm/plugins/table/utils/dom.js +6 -0
- package/dist/esm/plugins/table/utils/index.js +1 -1
- package/dist/types/plugins/table/commands/hover.d.ts +2 -1
- package/dist/types/plugins/table/commands/index.d.ts +1 -1
- package/dist/types/plugins/table/event-handlers.d.ts +1 -0
- package/dist/types/plugins/table/nodeviews/types.d.ts +4 -3
- package/dist/types/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/default-table-selection.d.ts +12 -0
- package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/table/types.d.ts +16 -1
- package/dist/types/plugins/table/ui/DragHandle/index.d.ts +11 -0
- package/dist/types/plugins/table/ui/DragPreview/index.d.ts +6 -0
- package/dist/types/plugins/table/ui/Icons/DragInMotionIcon.d.ts +6 -0
- package/dist/types/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +4 -1
- package/dist/types/plugins/table/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +17 -0
- package/dist/types/plugins/table/ui/TableFloatingControls/RowControls/DragControls.d.ts +16 -0
- package/dist/types/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +2 -17
- package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +3 -2
- package/dist/types/plugins/table/ui/consts.d.ts +1 -0
- package/dist/types/plugins/table/utils/decoration.d.ts +2 -2
- package/dist/types/plugins/table/utils/dom.d.ts +2 -0
- package/dist/types/plugins/table/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/commands/hover.d.ts +2 -1
- package/dist/types-ts4.5/plugins/table/commands/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +1 -0
- package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +4 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/default-table-selection.d.ts +12 -0
- package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/types.d.ts +16 -1
- package/dist/types-ts4.5/plugins/table/ui/DragHandle/index.d.ts +11 -0
- package/dist/types-ts4.5/plugins/table/ui/DragPreview/index.d.ts +6 -0
- package/dist/types-ts4.5/plugins/table/ui/Icons/DragInMotionIcon.d.ts +6 -0
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +4 -1
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +17 -0
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/DragControls.d.ts +16 -0
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +2 -17
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +3 -2
- package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +1 -0
- package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/utils/dom.d.ts +2 -0
- package/dist/types-ts4.5/plugins/table/utils/index.d.ts +1 -1
- package/package.json +5 -3
- package/src/__tests__/unit/event-handlers.ts +74 -1
- package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +35 -15
- package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +146 -42
- package/src/__tests__/unit/ui/NumberColumn.tsx +148 -0
- package/src/__tests__/unit/ui/RowControls.tsx +4 -4
- package/src/__tests__/unit/ui/RowDragControls.tsx +118 -0
- package/src/__tests__/unit/ui/TableFloatingControls.tsx +9 -5
- package/src/plugins/table/commands/hover.ts +16 -7
- package/src/plugins/table/commands/index.ts +1 -0
- package/src/plugins/table/commands/misc.ts +0 -5
- package/src/plugins/table/event-handlers.ts +49 -2
- package/src/plugins/table/index.tsx +1 -1
- package/src/plugins/table/nodeviews/TableComponent.tsx +3 -2
- package/src/plugins/table/nodeviews/table.tsx +2 -0
- package/src/plugins/table/nodeviews/types.ts +4 -3
- package/src/plugins/table/pm-plugins/decorations/plugin.ts +13 -4
- package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +10 -5
- package/src/plugins/table/pm-plugins/default-table-selection.ts +10 -0
- package/src/plugins/table/pm-plugins/main.ts +9 -4
- package/src/plugins/table/reducer.ts +2 -1
- package/src/plugins/table/types.ts +14 -2
- package/src/plugins/table/ui/DragHandle/index.tsx +57 -0
- package/src/plugins/table/ui/DragPreview/index.tsx +45 -0
- package/src/plugins/table/ui/Icons/DragInMotionIcon.tsx +60 -0
- package/src/plugins/table/ui/TableFloatingControls/NumberColumn/index.tsx +68 -30
- package/src/plugins/table/ui/TableFloatingControls/RowControls/ClassicControls.tsx +129 -0
- package/src/plugins/table/ui/TableFloatingControls/RowControls/DragControls.tsx +75 -0
- package/src/plugins/table/ui/TableFloatingControls/RowControls/index.tsx +2 -135
- package/src/plugins/table/ui/TableFloatingControls/index.tsx +43 -24
- package/src/plugins/table/ui/common-styles.ts +52 -11
- package/src/plugins/table/ui/consts.ts +1 -0
- package/src/plugins/table/ui/ui-styles.ts +58 -14
- package/src/plugins/table/utils/decoration.ts +75 -27
- package/src/plugins/table/utils/dom.ts +8 -0
- package/src/plugins/table/utils/index.ts +2 -0
- package/tsconfig.app.json +6 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.RowControls = void 0;
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
var _reactIntlNext = require("react-intl-next");
|
|
18
|
+
var _commands = require("../../../commands");
|
|
19
|
+
var _types = require("../../../types");
|
|
20
|
+
var _utils = require("../../../utils");
|
|
21
|
+
var _consts = require("../../consts");
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
+
var messages = (0, _reactIntlNext.defineMessages)({
|
|
27
|
+
rowControl: {
|
|
28
|
+
id: 'fabric.editor.rowControl',
|
|
29
|
+
defaultMessage: 'Highlight row',
|
|
30
|
+
description: 'A button on the left of each row that shows up when the table is in focus. Clicking on it will select the entire row.'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
34
|
+
(0, _inherits2.default)(RowControlsComponent, _Component);
|
|
35
|
+
var _super = _createSuper(RowControlsComponent);
|
|
36
|
+
function RowControlsComponent() {
|
|
37
|
+
var _this;
|
|
38
|
+
(0, _classCallCheck2.default)(this, RowControlsComponent);
|
|
39
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
|
+
args[_key] = arguments[_key];
|
|
41
|
+
}
|
|
42
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
43
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clearHoverSelection", function () {
|
|
44
|
+
var _this$props$editorVie = _this.props.editorView,
|
|
45
|
+
state = _this$props$editorVie.state,
|
|
46
|
+
dispatch = _this$props$editorVie.dispatch;
|
|
47
|
+
(0, _commands.clearHoverSelection)()(state, dispatch);
|
|
48
|
+
});
|
|
49
|
+
return _this;
|
|
50
|
+
}
|
|
51
|
+
(0, _createClass2.default)(RowControlsComponent, [{
|
|
52
|
+
key: "render",
|
|
53
|
+
value: function render() {
|
|
54
|
+
var _this2 = this;
|
|
55
|
+
var _this$props = this.props,
|
|
56
|
+
editorView = _this$props.editorView,
|
|
57
|
+
tableRef = _this$props.tableRef,
|
|
58
|
+
hoveredRows = _this$props.hoveredRows,
|
|
59
|
+
isInDanger = _this$props.isInDanger,
|
|
60
|
+
isResizing = _this$props.isResizing,
|
|
61
|
+
formatMessage = _this$props.intl.formatMessage;
|
|
62
|
+
if (!tableRef) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
var selection = editorView.state.selection;
|
|
66
|
+
var rowHeights = (0, _utils.getRowHeights)(tableRef);
|
|
67
|
+
var rowsParams = (0, _utils.getRowsParams)(rowHeights);
|
|
68
|
+
var firstRow = tableRef.querySelector('tr');
|
|
69
|
+
var hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
className: _types.TableCssClassName.ROW_CONTROLS
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
+
className: _types.TableCssClassName.ROW_CONTROLS_INNER
|
|
74
|
+
}, rowsParams.map(function (_ref, index) {
|
|
75
|
+
var startIndex = _ref.startIndex,
|
|
76
|
+
endIndex = _ref.endIndex,
|
|
77
|
+
height = _ref.height;
|
|
78
|
+
// if previous row was header row, add its height to our margin
|
|
79
|
+
var marginTop = -1;
|
|
80
|
+
if (index === 1 && hasHeaderRow && _this2.props.stickyTop !== undefined) {
|
|
81
|
+
marginTop += rowHeights[index - 1] + _consts.tableToolbarSize;
|
|
82
|
+
}
|
|
83
|
+
var thisRowSticky = _this2.props.stickyTop !== undefined && index === 0 && hasHeaderRow;
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
className: "".concat(_types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, " ").concat((0, _utils.getRowClassNames)(startIndex, selection, hoveredRows, isInDanger, isResizing), " ").concat(thisRowSticky ? 'sticky' : ''),
|
|
86
|
+
key: startIndex,
|
|
87
|
+
style: {
|
|
88
|
+
height: height,
|
|
89
|
+
marginTop: "".concat(marginTop, "px"),
|
|
90
|
+
top: thisRowSticky ? "".concat(_this2.props.stickyTop + 3, "px") : undefined,
|
|
91
|
+
paddingTop: thisRowSticky ? "".concat(_consts.tableControlsSpacing, "px") : undefined
|
|
92
|
+
}
|
|
93
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
94
|
+
"aria-label": formatMessage(messages.rowControl),
|
|
95
|
+
type: "button",
|
|
96
|
+
className: "".concat(_types.TableCssClassName.ROW_CONTROLS_BUTTON, " ").concat(_types.TableCssClassName.CONTROLS_BUTTON),
|
|
97
|
+
onClick: function onClick(event) {
|
|
98
|
+
return _this2.props.selectRow(startIndex, event.shiftKey);
|
|
99
|
+
},
|
|
100
|
+
onMouseOver: function onMouseOver() {
|
|
101
|
+
return _this2.props.hoverRows([startIndex]);
|
|
102
|
+
},
|
|
103
|
+
onMouseOut: _this2.clearHoverSelection,
|
|
104
|
+
"data-start-index": startIndex,
|
|
105
|
+
"data-end-index": endIndex
|
|
106
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
className: _types.TableCssClassName.CONTROLS_INSERT_MARKER
|
|
108
|
+
}));
|
|
109
|
+
})));
|
|
110
|
+
}
|
|
111
|
+
}]);
|
|
112
|
+
return RowControlsComponent;
|
|
113
|
+
}(_react.Component);
|
|
114
|
+
var RowControls = exports.RowControls = (0, _reactIntlNext.injectIntl)(RowControlsComponent);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.DragControls = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactIntlNext = require("react-intl-next");
|
|
10
|
+
var _utils = require("@atlaskit/editor-tables/utils");
|
|
11
|
+
var _types = require("../../../types");
|
|
12
|
+
var _utils2 = require("../../../utils");
|
|
13
|
+
var _DragHandle = require("../../DragHandle");
|
|
14
|
+
var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
15
|
+
var tableRef = _ref.tableRef,
|
|
16
|
+
hoveredCell = _ref.hoveredCell,
|
|
17
|
+
hoverRows = _ref.hoverRows,
|
|
18
|
+
selectRow = _ref.selectRow,
|
|
19
|
+
tableActive = _ref.tableActive,
|
|
20
|
+
editorView = _ref.editorView;
|
|
21
|
+
var rowHeights = (0, _utils2.getRowHeights)(tableRef);
|
|
22
|
+
var heights = rowHeights.map(function (height) {
|
|
23
|
+
return "".concat(height - 1, "px");
|
|
24
|
+
}).join(' ');
|
|
25
|
+
var _onClick = function onClick(index, event) {};
|
|
26
|
+
var onMouseOver = function onMouseOver() {};
|
|
27
|
+
var onMouseOut = function onMouseOut() {};
|
|
28
|
+
var rowIndex = hoveredCell === null || hoveredCell === void 0 ? void 0 : hoveredCell.rowIndex;
|
|
29
|
+
var getLocalId = function getLocalId() {
|
|
30
|
+
var _tableNode$node;
|
|
31
|
+
var tableNode = (0, _utils.findTable)(editorView.state.selection);
|
|
32
|
+
return (tableNode === null || tableNode === void 0 || (_tableNode$node = tableNode.node) === null || _tableNode$node === void 0 || (_tableNode$node = _tableNode$node.attrs) === null || _tableNode$node === void 0 ? void 0 : _tableNode$node.localId) || '';
|
|
33
|
+
};
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
35
|
+
className: _types.TableCssClassName.ROW_CONTROLS_WITH_DRAG,
|
|
36
|
+
style: {
|
|
37
|
+
gridTemplateRows: heights
|
|
38
|
+
}
|
|
39
|
+
}, Number.isFinite(rowIndex) && /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
style: {
|
|
41
|
+
gridRow: "".concat(rowIndex + 1, " / span 1")
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_DragHandle.DragHandle, {
|
|
44
|
+
onClick: function onClick(event) {
|
|
45
|
+
return _onClick(rowIndex, event);
|
|
46
|
+
},
|
|
47
|
+
onMouseOver: onMouseOver,
|
|
48
|
+
onMouseOut: onMouseOut,
|
|
49
|
+
tableLocalId: getLocalId(),
|
|
50
|
+
indexes: []
|
|
51
|
+
})));
|
|
52
|
+
};
|
|
53
|
+
var DragControls = exports.DragControls = (0, _reactIntlNext.injectIntl)(DragControlsComponent);
|
|
@@ -1,114 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
var _reactIntlNext = require("react-intl-next");
|
|
18
|
-
var _commands = require("../../../commands");
|
|
19
|
-
var _types = require("../../../types");
|
|
20
|
-
var _utils = require("../../../utils");
|
|
21
|
-
var _consts = require("../../consts");
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
-
var messages = (0, _reactIntlNext.defineMessages)({
|
|
27
|
-
rowControl: {
|
|
28
|
-
id: 'fabric.editor.rowControl',
|
|
29
|
-
defaultMessage: 'Highlight row',
|
|
30
|
-
description: 'A button on the left of each row that shows up when the table is in focus. Clicking on it will select the entire row.'
|
|
6
|
+
Object.defineProperty(exports, "DragControls", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _DragControls.DragControls;
|
|
31
10
|
}
|
|
32
11
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var _this;
|
|
38
|
-
(0, _classCallCheck2.default)(this, RowControlsComponent);
|
|
39
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
|
-
args[_key] = arguments[_key];
|
|
41
|
-
}
|
|
42
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
43
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clearHoverSelection", function () {
|
|
44
|
-
var _this$props$editorVie = _this.props.editorView,
|
|
45
|
-
state = _this$props$editorVie.state,
|
|
46
|
-
dispatch = _this$props$editorVie.dispatch;
|
|
47
|
-
(0, _commands.clearHoverSelection)()(state, dispatch);
|
|
48
|
-
});
|
|
49
|
-
return _this;
|
|
12
|
+
Object.defineProperty(exports, "RowControls", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _ClassicControls.RowControls;
|
|
50
16
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _this2 = this;
|
|
55
|
-
var _this$props = this.props,
|
|
56
|
-
editorView = _this$props.editorView,
|
|
57
|
-
tableRef = _this$props.tableRef,
|
|
58
|
-
hoveredRows = _this$props.hoveredRows,
|
|
59
|
-
isInDanger = _this$props.isInDanger,
|
|
60
|
-
isResizing = _this$props.isResizing,
|
|
61
|
-
formatMessage = _this$props.intl.formatMessage;
|
|
62
|
-
if (!tableRef) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
var selection = editorView.state.selection;
|
|
66
|
-
var rowHeights = (0, _utils.getRowHeights)(tableRef);
|
|
67
|
-
var rowsParams = (0, _utils.getRowsParams)(rowHeights);
|
|
68
|
-
var firstRow = tableRef.querySelector('tr');
|
|
69
|
-
var hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
70
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
-
className: _types.TableCssClassName.ROW_CONTROLS
|
|
72
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
-
className: _types.TableCssClassName.ROW_CONTROLS_INNER
|
|
74
|
-
}, rowsParams.map(function (_ref, index) {
|
|
75
|
-
var startIndex = _ref.startIndex,
|
|
76
|
-
endIndex = _ref.endIndex,
|
|
77
|
-
height = _ref.height;
|
|
78
|
-
// if previous row was header row, add its height to our margin
|
|
79
|
-
var marginTop = -1;
|
|
80
|
-
if (index === 1 && hasHeaderRow && _this2.props.stickyTop !== undefined) {
|
|
81
|
-
marginTop += rowHeights[index - 1] + _consts.tableToolbarSize;
|
|
82
|
-
}
|
|
83
|
-
var thisRowSticky = _this2.props.stickyTop !== undefined && index === 0 && hasHeaderRow;
|
|
84
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
-
className: "".concat(_types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, " ").concat((0, _utils.getRowClassNames)(startIndex, selection, hoveredRows, isInDanger, isResizing), " ").concat(thisRowSticky ? 'sticky' : ''),
|
|
86
|
-
key: startIndex,
|
|
87
|
-
style: {
|
|
88
|
-
height: height,
|
|
89
|
-
marginTop: "".concat(marginTop, "px"),
|
|
90
|
-
top: thisRowSticky ? "".concat(_this2.props.stickyTop + 3, "px") : undefined,
|
|
91
|
-
paddingTop: thisRowSticky ? "".concat(_consts.tableControlsSpacing, "px") : undefined
|
|
92
|
-
}
|
|
93
|
-
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
94
|
-
"aria-label": formatMessage(messages.rowControl),
|
|
95
|
-
type: "button",
|
|
96
|
-
className: "".concat(_types.TableCssClassName.ROW_CONTROLS_BUTTON, "\n ").concat(_types.TableCssClassName.CONTROLS_BUTTON, "\n "),
|
|
97
|
-
onClick: function onClick(event) {
|
|
98
|
-
return _this2.props.selectRow(startIndex, event.shiftKey);
|
|
99
|
-
},
|
|
100
|
-
onMouseOver: function onMouseOver() {
|
|
101
|
-
return _this2.props.hoverRows([startIndex]);
|
|
102
|
-
},
|
|
103
|
-
onMouseOut: _this2.clearHoverSelection,
|
|
104
|
-
"data-start-index": startIndex,
|
|
105
|
-
"data-end-index": endIndex
|
|
106
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
-
className: _types.TableCssClassName.CONTROLS_INSERT_MARKER
|
|
108
|
-
}));
|
|
109
|
-
})));
|
|
110
|
-
}
|
|
111
|
-
}]);
|
|
112
|
-
return RowControlsComponent;
|
|
113
|
-
}(_react.Component);
|
|
114
|
-
var RowControls = exports.RowControls = (0, _reactIntlNext.injectIntl)(RowControlsComponent);
|
|
17
|
+
});
|
|
18
|
+
var _ClassicControls = require("./ClassicControls");
|
|
19
|
+
var _DragControls = require("./DragControls");
|
|
@@ -111,10 +111,11 @@ var TableFloatingControls = exports.default = /*#__PURE__*/function (_Component)
|
|
|
111
111
|
isHeaderColumnEnabled = _this$props.isHeaderColumnEnabled,
|
|
112
112
|
ordering = _this$props.ordering,
|
|
113
113
|
headerRowHeight = _this$props.headerRowHeight,
|
|
114
|
-
stickyHeader = _this$props.stickyHeader
|
|
114
|
+
stickyHeader = _this$props.stickyHeader,
|
|
115
|
+
hoveredCell = _this$props.hoveredCell;
|
|
115
116
|
var tableHeight = (_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.tableHeight;
|
|
116
117
|
var nextTableHeight = nextState === null || nextState === void 0 ? void 0 : nextState.tableHeight;
|
|
117
|
-
return ordering !== nextProps.ordering || tableRef !== nextProps.tableRef || tableHeight !== nextTableHeight || tableActive !== nextProps.tableActive || isInDanger !== nextProps.isInDanger || isResizing !== nextProps.isResizing || hoveredRows !== nextProps.hoveredRows || isHeaderRowEnabled !== nextProps.isHeaderRowEnabled || isHeaderColumnEnabled !== nextProps.isHeaderColumnEnabled || isNumberColumnEnabled !== nextProps.isNumberColumnEnabled || (0, _utils2.isSelectionUpdated)(selection, nextProps.selection) || headerRowHeight !== nextProps.headerRowHeight || stickyHeader !== nextProps.stickyHeader;
|
|
118
|
+
return ordering !== nextProps.ordering || tableRef !== nextProps.tableRef || tableHeight !== nextTableHeight || tableActive !== nextProps.tableActive || isInDanger !== nextProps.isInDanger || isResizing !== nextProps.isResizing || hoveredRows !== nextProps.hoveredRows || isHeaderRowEnabled !== nextProps.isHeaderRowEnabled || isHeaderColumnEnabled !== nextProps.isHeaderColumnEnabled || isNumberColumnEnabled !== nextProps.isNumberColumnEnabled || (0, _utils2.isSelectionUpdated)(selection, nextProps.selection) || headerRowHeight !== nextProps.headerRowHeight || stickyHeader !== nextProps.stickyHeader || hoveredCell !== nextProps.hoveredCell;
|
|
118
119
|
}
|
|
119
120
|
}, {
|
|
120
121
|
key: "componentWillUnmount",
|
|
@@ -137,7 +138,9 @@ var TableFloatingControls = exports.default = /*#__PURE__*/function (_Component)
|
|
|
137
138
|
tableActive = _this$props2.tableActive,
|
|
138
139
|
hasHeaderRow = _this$props2.hasHeaderRow,
|
|
139
140
|
hoveredRows = _this$props2.hoveredRows,
|
|
140
|
-
stickyHeader = _this$props2.stickyHeader
|
|
141
|
+
stickyHeader = _this$props2.stickyHeader,
|
|
142
|
+
isDragAndDropEnabled = _this$props2.isDragAndDropEnabled,
|
|
143
|
+
hoveredCell = _this$props2.hoveredCell;
|
|
141
144
|
if (!tableRef) {
|
|
142
145
|
return null;
|
|
143
146
|
}
|
|
@@ -156,8 +159,15 @@ var TableFloatingControls = exports.default = /*#__PURE__*/function (_Component)
|
|
|
156
159
|
isInDanger: isInDanger,
|
|
157
160
|
isResizing: isResizing,
|
|
158
161
|
selectRow: this.selectRow,
|
|
159
|
-
stickyTop: stickyTop
|
|
160
|
-
|
|
162
|
+
stickyTop: stickyTop,
|
|
163
|
+
isDragAndDropEnabled: isDragAndDropEnabled
|
|
164
|
+
}) : null, tableActive && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isDragAndDropEnabled ? /*#__PURE__*/_react.default.createElement(_RowControls.DragControls, {
|
|
165
|
+
tableRef: tableRef,
|
|
166
|
+
hoveredCell: hoveredCell,
|
|
167
|
+
editorView: editorView,
|
|
168
|
+
hoverRows: this.hoverRows,
|
|
169
|
+
selectRow: this.selectRow
|
|
170
|
+
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_CornerControls.CornerControls, {
|
|
161
171
|
editorView: editorView,
|
|
162
172
|
tableRef: tableRef,
|
|
163
173
|
isInDanger: isInDanger,
|
|
@@ -175,7 +185,7 @@ var TableFloatingControls = exports.default = /*#__PURE__*/function (_Component)
|
|
|
175
185
|
isResizing: isResizing,
|
|
176
186
|
selectRow: this.selectRow,
|
|
177
187
|
stickyTop: tableActive ? stickyTop : undefined
|
|
178
|
-
})));
|
|
188
|
+
}))));
|
|
179
189
|
}
|
|
180
190
|
}]);
|
|
181
191
|
return TableFloatingControls;
|
|
@@ -16,7 +16,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
16
16
|
var _types = require("../types");
|
|
17
17
|
var _consts = require("./consts");
|
|
18
18
|
var _uiStyles = require("./ui-styles");
|
|
19
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
19
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
20
20
|
var cornerControlHeight = _consts.tableToolbarSize + 1;
|
|
21
21
|
|
|
22
22
|
/*
|
|
@@ -54,18 +54,21 @@ var tableStickyHeaderColumnControlsDecorationsStyle = function tableStickyHeader
|
|
|
54
54
|
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " .", " {\n z-index: 0;\n }\n "])), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
+
var tableRowControlStyles = function tableRowControlStyles() {
|
|
58
|
+
return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.drag-and-drop') ? (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: absolute;\n margin-top: ", "px;\n left: -", "px;\n z-index: ", ";\n }\n "])), _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _styles.tableMarginTop, _consts.tableToolbarSize + 1, _consts.rowControlsZIndex) : (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n left: -", "px;\n }\n "])), _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _styles.tableMarginTop - cornerControlHeight + 1, _consts.tableToolbarSize);
|
|
59
|
+
};
|
|
57
60
|
var tableWrapperStyles = function tableWrapperStyles() {
|
|
58
61
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width')) {
|
|
59
|
-
return (0, _react.css)(
|
|
62
|
+
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n\n > table[data-number-column='true'] {\n width: calc(100% - 1px);\n }\n }\n "])), _types.TableCssClassName.TABLE_NODE_WRAPPER);
|
|
60
63
|
} else {
|
|
61
|
-
return (0, _react.css)(
|
|
64
|
+
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n }\n "])), _types.TableCssClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset);
|
|
62
65
|
}
|
|
63
66
|
};
|
|
64
67
|
|
|
65
68
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4139
|
|
66
69
|
var tableStyles = exports.tableStyles = function tableStyles(props) {
|
|
67
70
|
var _props$featureFlags;
|
|
68
|
-
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n ", "\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n /* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n .", ", .", " {\n width: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n ", "\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: ", "px;\n\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n /* ED-19064: To fix when enable header column in the table,\n and selection the header column, the right border is not tableBorderSelectedColor\n when deleting the header column, the right border is not tableToolbarDeleteColor */\n td.", ",\n td.", ",\n th.", ".", ",\n th.", ".", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n\n .", " {\n position: absolute;\n top: ", "px;\n }\n\n ", "\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /*\n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n\n ", "\n"])), _types.TableCssClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(_colors.N20A, ")"), "var(--ds-icon, ".concat(_colors.N300, ")"), _types.TableCssClassName.LAYOUT_BUTTON, _types.TableCssClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(_colors.B300, ")"), "var(--ds-icon, white)", (0, _styles.tableSharedStyle)(props), (0, _uiStyles.columnControlsLineMarker)(), (0, _uiStyles.hoveredDeleteButton)(props), (0, _uiStyles.hoveredCell)(props), _uiStyles.hoveredWarningCell, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.drag-and-drop') && (0, _uiStyles.insertLine)(props), (0, _uiStyles.resizeHandle)(props), rangeSelectionStyles, _types.TableCssClassName.LAST_ITEM_IN_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, (0, _consts.tableCellBackgroundColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, (0, _uiStyles.insertColumnButtonWrapper)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, (0, _uiStyles.insertRowButtonWrapper)(props), (0, _uiStyles.DeleteButton)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.stickyRowOffsetTop + 2, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.stickyRowOffsetTop, "var(--ds-surface, white)", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, "var(--ds-surface, white)", _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize, _consts.tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.tableToolbarSize, "var(--ds-surface, white)", _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, "var(--ds-surface, green)", _consts.stickyRowOffsetTop, _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex - 5, "var(--ds-surface, white)", "var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tableToolbarSize, _consts.stickyHeaderBorderBottomWidth, (0, _consts.tableBorderColor)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, insertColumnButtonOffset + 1, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_CONTROLS, _consts.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableControlsSpacing + 2, _types.TableCssClassName.CORNER_CONTROLS, _consts.tableControlsSpacing - _consts.tableToolbarSize + 2, "var(--ds-surface, white)", sentinelStyles, (0, _uiStyles.OverflowShadow)(props), stickyScrollbarStyles(), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tablePadding, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.COLUMN_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts.tablePadding - 1, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _consts.tableOverflowShadowWidth, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _types.TableCssClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), (0, _uiStyles.columnControlsDecoration)(props), _types.TableCssClassName.CORNER_CONTROLS, _consts.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)(props, "\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize + 1, _consts.tableToolbarSize + 1, (0, _consts.tableBorderColor)(props), _consts.tableBorderRadiusSize, (0, _consts.tableHeaderCellBackgroundColor)(props), _types.TableCssClassName.CONTROLS_CORNER_BUTTON, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth + 1 : _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _consts.tableBorderDeleteColor)(props), (0, _consts.tableToolbarDeleteColor)(props), _types.TableCssClassName.ROW_CONTROLS, _consts.tableToolbarSize, (0, _uiStyles.InsertMarker)(props, "\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)(props, "\n border-bottom: 1px solid ".concat((0, _consts.tableBorderColor)(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), (0, _uiStyles.floatingColumnControls)(props), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(props), (0, _uiStyles.HeaderButtonDanger)(props), _types.TableCssClassName.NUMBERED_COLUMN, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? _editorSharedStyles.akEditorTableToolbarSize : _editorSharedStyles.akEditorTableToolbarSize - 1, _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderColor)(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _consts.tableHeaderCellBackgroundColor)(props), (0, _consts.tableTextColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? 0 : 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _editorSharedStyles.akEditorUnitZIndex, "var(--ds-text-selected, ".concat(_colors.N0, ")"), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _editorSharedStyles.akEditorUnitZIndex, "var(--ds-text-selected, ".concat(_colors.N0, ")"), _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _consts.tableToolbarDeleteColor)(props), (0, _consts.tableBorderDeleteColor)(props), "var(--ds-text-danger, ".concat(_colors.R500, ")"), _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, (0, _consts.tableBorderSelectedColor)(props), _types.TableCssClassName.SELECTED_CELL, (0, _consts.tableCellSelectedColor)(props), _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _consts.tableCellDeleteColor)(props), _editorSharedStyles.akEditorUnitZIndex * 100, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL, (0, _consts.tableBorderSelectedColor)(props), _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(props), _editorSharedStyles.akEditorUnitZIndex * 100, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _styles.tableMarginTop - cornerControlHeight + 1, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_LEFT_SHADOW, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tableToolbarSize, _types.TableCssClassName.COLUMN_CONTROLS_WRAPPER, _styles.tableMarginTop + 1, tableWrapperStyles(), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.TABLE_NODE_WRAPPER, _scrollbar.scrollbarStyles, _types.TableCssClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
|
|
71
|
+
return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n ", "\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n /* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n .", ", .", " {\n width: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n .", " {\n display: grid;\n align-items: center;\n position: absolute;\n }\n\n ", "\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n // add a background above the first numbered column cell when sticky header is engaged\n // which hides the table when scrolling\n .", ":first-of-type::after {\n content: '';\n display: block;\n height: 33px;\n width: 100%;\n background-color: ", ";\n position: absolute;\n\n // the extra pixel is accounting for borders\n top: -34px;\n left: -1px;\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: ", "px;\n\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", ":not(.", ") {\n cursor: pointer;\n }\n .", ":not(.", "):hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n /* ED-19064: To fix when enable header column in the table,\n and selection the header column, the right border is not tableBorderSelectedColor\n when deleting the header column, the right border is not tableToolbarDeleteColor */\n td.", ",\n td.", ",\n th.", ".", ",\n th.", ".", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n ", ";\n z-index: ", ";\n }\n }\n }\n ", "\n .", ".", " {\n z-index: ", ";\n }\n\n .", " {\n position: absolute;\n top: ", "px;\n }\n\n ", "\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /*\n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n\n ", "\n"])), _types.TableCssClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(_colors.N20A, ")"), "var(--ds-icon, ".concat(_colors.N300, ")"), _types.TableCssClassName.LAYOUT_BUTTON, _types.TableCssClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(_colors.B300, ")"), "var(--ds-icon, white)", (0, _styles.tableSharedStyle)(props), (0, _uiStyles.columnControlsLineMarker)(), (0, _uiStyles.hoveredDeleteButton)(props), (0, _uiStyles.hoveredCell)(props), _uiStyles.hoveredWarningCell, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.drag-and-drop') && (0, _uiStyles.insertLine)(props), (0, _uiStyles.resizeHandle)(props), rangeSelectionStyles, _types.TableCssClassName.LAST_ITEM_IN_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, (0, _consts.tableCellBackgroundColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, (0, _uiStyles.insertColumnButtonWrapper)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, (0, _uiStyles.insertRowButtonWrapper)(props), (0, _uiStyles.DeleteButton)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.stickyRowOffsetTop + 2, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.stickyRowOffsetTop, "var(--ds-surface, white)", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, "var(--ds-surface, white)", _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize, _consts.tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.tableToolbarSize, "var(--ds-surface, white)", _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, "var(--ds-surface, green)", _consts.stickyRowOffsetTop, _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex - 5, "var(--ds-surface, white)", "var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tableToolbarSize, _consts.stickyHeaderBorderBottomWidth, (0, _consts.tableBorderColor)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, insertColumnButtonOffset + 1, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_CONTROLS, _consts.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableControlsSpacing + 2, _types.TableCssClassName.CORNER_CONTROLS, _consts.tableControlsSpacing - _consts.tableToolbarSize + 2, "var(--ds-surface, white)", sentinelStyles, (0, _uiStyles.OverflowShadow)(props), stickyScrollbarStyles(), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tablePadding, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.COLUMN_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts.tablePadding - 1, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _consts.tableOverflowShadowWidth, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _types.TableCssClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), (0, _uiStyles.columnControlsDecoration)(props), _types.TableCssClassName.CORNER_CONTROLS, _consts.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)(props, "\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize + 1, _consts.tableToolbarSize + 1, (0, _consts.tableBorderColor)(props), _consts.tableBorderRadiusSize, (0, _consts.tableHeaderCellBackgroundColor)(props), _types.TableCssClassName.CONTROLS_CORNER_BUTTON, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth + 1 : _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _consts.tableBorderDeleteColor)(props), (0, _consts.tableToolbarDeleteColor)(props), _types.TableCssClassName.ROW_CONTROLS, _consts.tableToolbarSize, (0, _uiStyles.InsertMarker)(props, "\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)(props, "\n border-bottom: 1px solid ".concat((0, _consts.tableBorderColor)(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), _types.TableCssClassName.ROW_CONTROLS_WITH_DRAG, (0, _uiStyles.floatingColumnControls)(props), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(props), (0, _uiStyles.HeaderButtonDanger)(props), _types.TableCssClassName.NUMBERED_COLUMN, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? _editorSharedStyles.akEditorTableToolbarSize : _editorSharedStyles.akEditorTableToolbarSize - 1, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.drag-and-drop') ? 0 : _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderColor)(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _consts.tableHeaderCellBackgroundColor)(props), (0, _consts.tableTextColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, white)", _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? 0 : 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _editorSharedStyles.akEditorUnitZIndex, "var(--ds-text-selected, ".concat(_colors.N0, ")"), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableBorderSelectedColor)(props), (0, _consts.tableToolbarSelectedColor)(props), _editorSharedStyles.akEditorUnitZIndex, "var(--ds-text-selected, ".concat(_colors.N0, ")"), _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _consts.tableToolbarDeleteColor)(props), (0, _consts.tableBorderDeleteColor)(props), "var(--ds-text-danger, ".concat(_colors.R500, ")"), _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS_WITH_DRAG, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, (0, _consts.tableBorderSelectedColor)(props), _types.TableCssClassName.SELECTED_CELL, (0, _consts.tableCellSelectedColor)(props), _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _consts.tableCellDeleteColor)(props), _editorSharedStyles.akEditorUnitZIndex * 100, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL, (0, _consts.tableBorderSelectedColor)(props), _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(props), _editorSharedStyles.akEditorUnitZIndex * 100, tableRowControlStyles(), _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_LEFT_SHADOW, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.COLUMN_CONTROLS_WRAPPER, _styles.tableMarginTop + 1, tableWrapperStyles(), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.TABLE_NODE_WRAPPER, _scrollbar.scrollbarStyles, _types.TableCssClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
|
|
69
72
|
};
|
|
70
|
-
var tableFullPageEditorStyles = exports.tableFullPageEditorStyles = (0, _react.css)(
|
|
71
|
-
var tableCommentEditorStyles = exports.tableCommentEditorStyles = (0, _react.css)(
|
|
73
|
+
var tableFullPageEditorStyles = exports.tableFullPageEditorStyles = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .", " > table {\n margin-left: 0;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n width: 100%;\n }\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER);
|
|
74
|
+
var tableCommentEditorStyles = exports.tableCommentEditorStyles = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _scrollbar.scrollbarStyles);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tableToolbarSize = exports.tableToolbarSelectedColor = exports.tableToolbarDeleteColor = exports.tableToolbarColor = exports.tableTextColor = exports.tableScrollbarOffset = exports.tablePadding = exports.tableOverflowShadowWidthWide = exports.tableOverflowShadowWidth = exports.tableMarginFullWidthMode = exports.tableInsertColumnButtonSize = exports.tableInsertColumnButtonOffset = exports.tableHeaderCellBackgroundColor = exports.tableFloatingControlsColor = exports.tableDeleteButtonSize = exports.tableDeleteButtonOffset = exports.tableControlsSpacing = exports.tableCellSelectedDeleteIconColor = exports.tableCellSelectedDeleteIconBackground = exports.tableCellSelectedColor = exports.tableCellHoverDeleteIconColor = exports.tableCellHoverDeleteIconBackground = exports.tableCellDeleteColor = exports.tableCellBackgroundColor = exports.tableBorderSelectedColor = exports.tableBorderRadiusSize = exports.tableBorderDeleteColor = exports.tableBorderColor = exports.stickyRowZIndex = exports.stickyRowOffsetTop = exports.stickyHeaderBorderBottomWidth = exports.resizeLineWidth = exports.resizeHandlerZIndex = exports.resizeHandlerAreaWidth = exports.lineMarkerSize = exports.lineMarkerOffsetFromColumnControls = exports.layoutButtonSize = exports.insertLineWidth = exports.contextualMenuTriggerSize = exports.contextualMenuDropdownWidth = exports.columnResizeHandleZIndex = exports.columnControlsZIndex = exports.columnControlsSelectedZIndex = exports.columnControlsDecorationHeight = exports.TABLE_SNAP_GAP = exports.TABLE_HIGHLIGHT_TOLERANCE = exports.TABLE_HIGHLIGHT_GAP = exports.STICKY_HEADER_TOGGLE_TOLERANCE_MS = void 0;
|
|
6
|
+
exports.tableToolbarSize = exports.tableToolbarSelectedColor = exports.tableToolbarDeleteColor = exports.tableToolbarColor = exports.tableTextColor = exports.tableScrollbarOffset = exports.tablePadding = exports.tableOverflowShadowWidthWide = exports.tableOverflowShadowWidth = exports.tableMarginFullWidthMode = exports.tableInsertColumnButtonSize = exports.tableInsertColumnButtonOffset = exports.tableHeaderCellBackgroundColor = exports.tableFloatingControlsColor = exports.tableDeleteButtonSize = exports.tableDeleteButtonOffset = exports.tableControlsSpacing = exports.tableCellSelectedDeleteIconColor = exports.tableCellSelectedDeleteIconBackground = exports.tableCellSelectedColor = exports.tableCellHoverDeleteIconColor = exports.tableCellHoverDeleteIconBackground = exports.tableCellDeleteColor = exports.tableCellBackgroundColor = exports.tableBorderSelectedColor = exports.tableBorderRadiusSize = exports.tableBorderDeleteColor = exports.tableBorderColor = exports.stickyRowZIndex = exports.stickyRowOffsetTop = exports.stickyHeaderBorderBottomWidth = exports.rowControlsZIndex = exports.resizeLineWidth = exports.resizeHandlerZIndex = exports.resizeHandlerAreaWidth = exports.lineMarkerSize = exports.lineMarkerOffsetFromColumnControls = exports.layoutButtonSize = exports.insertLineWidth = exports.contextualMenuTriggerSize = exports.contextualMenuDropdownWidth = exports.columnResizeHandleZIndex = exports.columnControlsZIndex = exports.columnControlsSelectedZIndex = exports.columnControlsDecorationHeight = exports.TABLE_SNAP_GAP = exports.TABLE_HIGHLIGHT_TOLERANCE = exports.TABLE_HIGHLIGHT_GAP = exports.STICKY_HEADER_TOGGLE_TOLERANCE_MS = void 0;
|
|
7
7
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -93,6 +93,7 @@ var lineMarkerSize = exports.lineMarkerSize = 4;
|
|
|
93
93
|
var columnControlsDecorationHeight = exports.columnControlsDecorationHeight = 25;
|
|
94
94
|
var columnControlsZIndex = exports.columnControlsZIndex = _editorSharedStyles.akEditorUnitZIndex * 10;
|
|
95
95
|
var columnControlsSelectedZIndex = exports.columnControlsSelectedZIndex = columnControlsZIndex + 1;
|
|
96
|
+
var rowControlsZIndex = exports.rowControlsZIndex = _editorSharedStyles.akEditorUnitZIndex * 10;
|
|
96
97
|
var columnResizeHandleZIndex = exports.columnResizeHandleZIndex = columnControlsSelectedZIndex + 1;
|
|
97
98
|
var insertLineWidth = exports.insertLineWidth = 3;
|
|
98
99
|
var resizeHandlerAreaWidth = exports.resizeHandlerAreaWidth = _types.RESIZE_HANDLE_AREA_DECORATION_GAP / 3;
|