@atlaskit/editor-plugin-table 5.3.14 → 5.3.16

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.
Files changed (144) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/plugins/table/event-handlers.js +4 -3
  3. package/dist/cjs/plugins/table/index.js +2 -1
  4. package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/plugin.js +1 -0
  5. package/dist/cjs/plugins/table/types.js +5 -3
  6. package/dist/cjs/plugins/table/ui/FloatingDragMenu/DragMenu.js +49 -11
  7. package/dist/cjs/plugins/table/ui/FloatingDragMenu/index.js +5 -2
  8. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +5 -0
  9. package/dist/cjs/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.js +3 -11
  10. package/dist/cjs/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +2 -2
  11. package/dist/cjs/plugins/table/ui/TableFloatingColumnControls/index.js +1 -1
  12. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +114 -0
  13. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/DragCornerControls.js +60 -0
  14. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +11 -112
  15. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/types.js +5 -0
  16. package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +1 -7
  17. package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +7 -2
  18. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  19. package/dist/cjs/plugins/table/ui/icons/AddColLeftIcon.js +44 -0
  20. package/dist/cjs/plugins/table/ui/icons/AddColRightIcon.js +44 -0
  21. package/dist/cjs/plugins/table/ui/icons/AddRowAboveIcon.js +45 -0
  22. package/dist/cjs/plugins/table/ui/icons/AddRowBelowIcon.js +40 -0
  23. package/dist/cjs/plugins/table/ui/icons/index.js +29 -1
  24. package/dist/cjs/plugins/table/ui/messages.js +5 -0
  25. package/dist/cjs/plugins/table/ui/ui-styles.js +28 -25
  26. package/dist/cjs/plugins/table/utils/dom.js +16 -7
  27. package/dist/cjs/plugins/table/utils/drag-menu.js +122 -10
  28. package/dist/cjs/plugins/table/utils/index.js +12 -6
  29. package/dist/es2019/plugins/table/event-handlers.js +5 -4
  30. package/dist/es2019/plugins/table/index.js +2 -1
  31. package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/plugin.js +2 -1
  32. package/dist/es2019/plugins/table/types.js +5 -3
  33. package/dist/es2019/plugins/table/ui/FloatingDragMenu/DragMenu.js +52 -8
  34. package/dist/es2019/plugins/table/ui/FloatingDragMenu/index.js +5 -2
  35. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +5 -0
  36. package/dist/es2019/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.js +3 -11
  37. package/dist/es2019/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +2 -2
  38. package/dist/es2019/plugins/table/ui/TableFloatingColumnControls/index.js +1 -1
  39. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +93 -0
  40. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/DragCornerControls.js +61 -0
  41. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -99
  42. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/types.js +1 -0
  43. package/dist/es2019/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +1 -7
  44. package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +8 -3
  45. package/dist/es2019/plugins/table/ui/common-styles.js +8 -6
  46. package/dist/es2019/plugins/table/ui/icons/AddColLeftIcon.js +35 -0
  47. package/dist/es2019/plugins/table/ui/icons/AddColRightIcon.js +35 -0
  48. package/dist/es2019/plugins/table/ui/icons/AddRowAboveIcon.js +36 -0
  49. package/dist/es2019/plugins/table/ui/icons/AddRowBelowIcon.js +31 -0
  50. package/dist/es2019/plugins/table/ui/icons/index.js +5 -1
  51. package/dist/es2019/plugins/table/ui/messages.js +5 -0
  52. package/dist/es2019/plugins/table/ui/ui-styles.js +44 -3
  53. package/dist/es2019/plugins/table/utils/dom.js +13 -6
  54. package/dist/es2019/plugins/table/utils/drag-menu.js +118 -8
  55. package/dist/es2019/plugins/table/utils/index.js +1 -1
  56. package/dist/esm/plugins/table/event-handlers.js +5 -4
  57. package/dist/esm/plugins/table/index.js +2 -1
  58. package/dist/esm/plugins/table/pm-plugins/drag-and-drop/plugin.js +2 -1
  59. package/dist/esm/plugins/table/types.js +5 -3
  60. package/dist/esm/plugins/table/ui/FloatingDragMenu/DragMenu.js +46 -8
  61. package/dist/esm/plugins/table/ui/FloatingDragMenu/index.js +5 -2
  62. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +5 -0
  63. package/dist/esm/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.js +3 -11
  64. package/dist/esm/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +2 -2
  65. package/dist/esm/plugins/table/ui/TableFloatingColumnControls/index.js +1 -1
  66. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +104 -0
  67. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/DragCornerControls.js +50 -0
  68. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -110
  69. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/types.js +1 -0
  70. package/dist/esm/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +1 -7
  71. package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +8 -3
  72. package/dist/esm/plugins/table/ui/common-styles.js +2 -2
  73. package/dist/esm/plugins/table/ui/icons/AddColLeftIcon.js +37 -0
  74. package/dist/esm/plugins/table/ui/icons/AddColRightIcon.js +37 -0
  75. package/dist/esm/plugins/table/ui/icons/AddRowAboveIcon.js +38 -0
  76. package/dist/esm/plugins/table/ui/icons/AddRowBelowIcon.js +33 -0
  77. package/dist/esm/plugins/table/ui/icons/index.js +5 -1
  78. package/dist/esm/plugins/table/ui/messages.js +5 -0
  79. package/dist/esm/plugins/table/ui/ui-styles.js +27 -24
  80. package/dist/esm/plugins/table/utils/dom.js +15 -6
  81. package/dist/esm/plugins/table/utils/drag-menu.js +120 -8
  82. package/dist/esm/plugins/table/utils/index.js +1 -1
  83. package/dist/types/plugins/table/types.d.ts +5 -3
  84. package/dist/types/plugins/table/ui/FloatingDragMenu/DragMenu.d.ts +5 -2
  85. package/dist/types/plugins/table/ui/FloatingDragMenu/index.d.ts +3 -1
  86. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/ClassicCornerControls.d.ts +6 -0
  87. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +6 -0
  88. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +2 -16
  89. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/types.d.ts +11 -0
  90. package/dist/types/plugins/table/ui/icons/AddColLeftIcon.d.ts +2 -0
  91. package/dist/types/plugins/table/ui/icons/AddColRightIcon.d.ts +2 -0
  92. package/dist/types/plugins/table/ui/icons/AddRowAboveIcon.d.ts +2 -0
  93. package/dist/types/plugins/table/ui/icons/AddRowBelowIcon.d.ts +2 -0
  94. package/dist/types/plugins/table/ui/icons/index.d.ts +4 -0
  95. package/dist/types/plugins/table/ui/messages.d.ts +5 -0
  96. package/dist/types/plugins/table/ui/ui-styles.d.ts +1 -0
  97. package/dist/types/plugins/table/utils/dom.d.ts +3 -2
  98. package/dist/types/plugins/table/utils/drag-menu.d.ts +6 -3
  99. package/dist/types/plugins/table/utils/index.d.ts +1 -1
  100. package/dist/types-ts4.5/plugins/table/types.d.ts +5 -3
  101. package/dist/types-ts4.5/plugins/table/ui/FloatingDragMenu/DragMenu.d.ts +5 -2
  102. package/dist/types-ts4.5/plugins/table/ui/FloatingDragMenu/index.d.ts +3 -1
  103. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/ClassicCornerControls.d.ts +6 -0
  104. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +6 -0
  105. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +2 -16
  106. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/types.d.ts +11 -0
  107. package/dist/types-ts4.5/plugins/table/ui/icons/AddColLeftIcon.d.ts +2 -0
  108. package/dist/types-ts4.5/plugins/table/ui/icons/AddColRightIcon.d.ts +2 -0
  109. package/dist/types-ts4.5/plugins/table/ui/icons/AddRowAboveIcon.d.ts +2 -0
  110. package/dist/types-ts4.5/plugins/table/ui/icons/AddRowBelowIcon.d.ts +2 -0
  111. package/dist/types-ts4.5/plugins/table/ui/icons/index.d.ts +4 -0
  112. package/dist/types-ts4.5/plugins/table/ui/messages.d.ts +5 -0
  113. package/dist/types-ts4.5/plugins/table/ui/ui-styles.d.ts +1 -0
  114. package/dist/types-ts4.5/plugins/table/utils/dom.d.ts +3 -2
  115. package/dist/types-ts4.5/plugins/table/utils/drag-menu.d.ts +6 -3
  116. package/dist/types-ts4.5/plugins/table/utils/index.d.ts +1 -1
  117. package/package.json +2 -2
  118. package/src/plugins/table/event-handlers.ts +7 -2
  119. package/src/plugins/table/index.tsx +1 -0
  120. package/src/plugins/table/pm-plugins/drag-and-drop/plugin.ts +7 -1
  121. package/src/plugins/table/types.ts +7 -4
  122. package/src/plugins/table/ui/FloatingDragMenu/DragMenu.tsx +73 -6
  123. package/src/plugins/table/ui/FloatingDragMenu/index.tsx +5 -0
  124. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +8 -0
  125. package/src/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.tsx +5 -7
  126. package/src/plugins/table/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +2 -2
  127. package/src/plugins/table/ui/TableFloatingColumnControls/index.tsx +1 -1
  128. package/src/plugins/table/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +107 -0
  129. package/src/plugins/table/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +66 -0
  130. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +2 -125
  131. package/src/plugins/table/ui/TableFloatingControls/CornerControls/types.ts +12 -0
  132. package/src/plugins/table/ui/TableFloatingControls/RowControls/DragControls.tsx +3 -3
  133. package/src/plugins/table/ui/TableFloatingControls/index.tsx +22 -14
  134. package/src/plugins/table/ui/common-styles.ts +8 -5
  135. package/src/plugins/table/ui/icons/AddColLeftIcon.tsx +43 -0
  136. package/src/plugins/table/ui/icons/AddColRightIcon.tsx +43 -0
  137. package/src/plugins/table/ui/icons/AddRowAboveIcon.tsx +42 -0
  138. package/src/plugins/table/ui/icons/AddRowBelowIcon.tsx +36 -0
  139. package/src/plugins/table/ui/icons/index.ts +4 -0
  140. package/src/plugins/table/ui/messages.ts +6 -0
  141. package/src/plugins/table/ui/ui-styles.ts +45 -3
  142. package/src/plugins/table/utils/dom.ts +16 -4
  143. package/src/plugins/table/utils/drag-menu.ts +158 -5
  144. package/src/plugins/table/utils/index.ts +2 -1
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ export var AddRowBelowIcon = function AddRowBelowIcon() {
3
+ return /*#__PURE__*/React.createElement("svg", {
4
+ width: "24",
5
+ height: "24",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ }, /*#__PURE__*/React.createElement("mask", {
10
+ id: "path-1-inside-1_920_47112",
11
+ fill: "var(--ds-border-inverse, #FFFFFF)"
12
+ }, /*#__PURE__*/React.createElement("rect", {
13
+ x: "6",
14
+ y: "4",
15
+ width: "12",
16
+ height: "8",
17
+ rx: "0.5"
18
+ })), /*#__PURE__*/React.createElement("rect", {
19
+ x: "6",
20
+ y: "4",
21
+ width: "12",
22
+ height: "8",
23
+ rx: "0.5",
24
+ stroke: "currentColor",
25
+ strokeWidth: "4",
26
+ mask: "url(#path-1-inside-1_920_47112)"
27
+ }), /*#__PURE__*/React.createElement("path", {
28
+ fillRule: "evenodd",
29
+ clipRule: "evenodd",
30
+ d: "M13 15V13.99C12.9974 13.7265 12.8908 13.4747 12.7036 13.2893C12.5163 13.104 12.2635 13 12 13C11.444 13 11 13.444 11 13.99V15H10C9.73478 15 9.48043 15.1054 9.29289 15.2929C9.10536 15.4804 9 15.7348 9 16C9 16.2652 9.10536 16.5196 9.29289 16.7071C9.48043 16.8946 9.73478 17 10 17H11V18.01C11.0026 18.2735 11.1092 18.5253 11.2964 18.7107C11.4837 18.896 11.7365 19 12 19C12.556 19 13 18.556 13 18.01V17H14C14.2652 17 14.5196 16.8946 14.7071 16.7071C14.8946 16.5196 15 16.2652 15 16C15 15.7348 14.8946 15.4804 14.7071 15.2929C14.5196 15.1054 14.2652 15 14 15H13Z",
31
+ fill: "currentColor"
32
+ }));
33
+ };
@@ -1,2 +1,6 @@
1
1
  export { DragHandleIcon } from './DragHandleIcon';
2
- export { DragInMotionIcon } from './DragInMotionIcon';
2
+ export { DragInMotionIcon } from './DragInMotionIcon';
3
+ export { AddRowAboveIcon } from './AddRowAboveIcon';
4
+ export { AddRowBelowIcon } from './AddRowBelowIcon';
5
+ export { AddColLeftIcon } from './AddColLeftIcon';
6
+ export { AddColRightIcon } from './AddColRightIcon';
@@ -59,5 +59,10 @@ export default defineMessages({
59
59
  id: 'fabric.editor.tables.adjustColumn',
60
60
  defaultMessage: 'Adjust column',
61
61
  description: 'Tooltip displayed on table column resize handle'
62
+ },
63
+ cornerControl: {
64
+ id: 'fabric.editor.cornerControl',
65
+ defaultMessage: 'Highlight table',
66
+ description: 'A button on the upper left corner of the table that shows up when the table is in focus. Clicking on it will select the entire table.'
62
67
  }
63
68
  });
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33;
3
3
  import { css } from '@emotion/react';
4
4
  import { tableCellBorderWidth, tableMarginTop, tableMarginTopWithControl } from '@atlaskit/editor-common/styles';
5
5
  import { akEditorShadowZIndex, akEditorTableNumberColumnWidth, akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
@@ -36,74 +36,77 @@ var InsertButtonHover = function InsertButtonHover() {
36
36
  return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n .", ":hover {\n background: ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_INSERT_BUTTON, "var(--ds-background-brand-bold, ".concat(B300, ")"), "var(--ds-icon-inverse, white)");
37
37
  };
38
38
  export var dragInsertButtonWrapper = function dragInsertButtonWrapper(props) {
39
- return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n .", " {\n position: absolute;\n z-index: ", ";\n bottom: -5px;\n left: 3px;\n }\n .", " {\n ", "\n }\n .", ":hover {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER, akEditorUnitZIndex + 10, ClassName.DRAG_CONTROLS_INSERT_BUTTON, Button("\n background: ".concat("var(--ds-surface-overlay, white)", ";\n color: ", "var(--ds-icon, ".concat(N300, ")"), ";\n border: 1px solid ", "var(--ds-background-accent-gray-subtler, #C1C7D0)", ";\n border-radius: 50%;\n ")), ClassName.DRAG_CONTROLS_INSERT_BUTTON, "var(--ds-background-brand-bold, ".concat(B300, ")"), "var(--ds-background-brand-bold, ".concat(B300, ")"), "var(--ds-icon-inverse, white)");
39
+ return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n .", " {\n position: absolute;\n z-index: ", ";\n bottom: -5px;\n left: 3px;\n }\n\n .", " {\n ", "\n }\n\n .", ":hover {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER, akEditorUnitZIndex + 10, ClassName.DRAG_CONTROLS_INSERT_BUTTON, Button("\n background: ".concat("var(--ds-surface-overlay, white)", ";\n color: ", "var(--ds-icon, ".concat(N300, ")"), ";\n border: 1px solid ", "var(--ds-background-accent-gray-subtler, #C1C7D0)", ";\n border-radius: 50%;\n ")), ClassName.DRAG_CONTROLS_INSERT_BUTTON, "var(--ds-background-brand-bold, ".concat(B300, ")"), "var(--ds-background-brand-bold, ".concat(B300, ")"), "var(--ds-icon-inverse, white)");
40
+ };
41
+ export var dragCornerControlButton = function dragCornerControlButton(props) {
42
+ return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n .", " {\n width: 12px;\n height: 12px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: ", ";\n left: ", ";\n background-color: ", ";\n border-radius: 50%;\n border: none;\n padding: 0;\n outline: none;\n z-index: ", ";\n\n &.active .", " {\n background-color: ", ";\n border-color: ", ";\n }\n\n &:hover {\n cursor: pointer;\n\n .", " {\n border-color: ", ";\n }\n }\n }\n\n .", " {\n border: 1px solid\n ", ";\n border-radius: 50%;\n width: 6px;\n height: 6px;\n }\n"])), ClassName.DRAG_CORNER_BUTTON, "var(--ds-space-negative-075, -6px)", "var(--ds-space-075, 6px)", "var(--ds-surface, #FFF)", akEditorUnitZIndex * 99, ClassName.DRAG_CORNER_BUTTON_INNER, "var(--ds-border-selected, #0C66E4)", "var(--ds-border-selected, #0C66E4)", ClassName.DRAG_CORNER_BUTTON_INNER, "var(--ds-border-selected, #0C66E4)", ClassName.DRAG_CORNER_BUTTON_INNER, "var(--ds-background-accent-gray-subtler, #DCDFE4)");
40
43
  };
41
44
  export var insertColumnButtonWrapper = function insertColumnButtonWrapper(props) {
42
- return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n"])), InsertButton(), InsertButtonHover(), InsertLine(props, "\n width: 2px;\n left: 9px;\n "));
45
+ return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n"])), InsertButton(), InsertButtonHover(), InsertLine(props, "\n width: 2px;\n left: 9px;\n "));
43
46
  };
44
47
  export var insertRowButtonWrapper = function insertRowButtonWrapper(props) {
45
- return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n"])), InsertButton(), InsertButtonHover(), InsertLine(props, "\n height: 2px;\n top: -11px;\n left: ".concat(tableInsertColumnButtonSize - 1, "px;\n ")));
48
+ return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n"])), InsertButton(), InsertButtonHover(), InsertLine(props, "\n height: 2px;\n top: -11px;\n left: ".concat(tableInsertColumnButtonSize - 1, "px;\n ")));
46
49
  };
47
50
  export var columnControlsLineMarker = function columnControlsLineMarker() {
48
- return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n .", ".", "\n table\n tr:first-of-type\n td,\n .", ".", "\n table\n tr:first-of-type\n th {\n position: relative;\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS);
51
+ return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n .", ".", "\n table\n tr:first-of-type\n td,\n .", ".", "\n table\n tr:first-of-type\n th {\n position: relative;\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS);
49
52
  };
50
53
  export var DeleteButton = function DeleteButton(props) {
51
- return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n .", ",\n .", " {\n height: ", "px;\n width: ", "px;\n }\n .", " {\n .", " {\n ", "\n }\n }\n\n .", ":hover {\n background: ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_DELETE_BUTTON_WRAP, ClassName.CONTROLS_DELETE_BUTTON, tableDeleteButtonSize, tableDeleteButtonSize, ClassName.CONTROLS_DELETE_BUTTON_WRAP, ClassName.CONTROLS_DELETE_BUTTON, Button("\n background: ".concat(tableCellSelectedDeleteIconBackground(props), ";\n color: ").concat(tableCellSelectedDeleteIconColor(props), ";\n ")), ClassName.CONTROLS_DELETE_BUTTON, tableCellHoverDeleteIconBackground(props), tableCellHoverDeleteIconColor(props));
54
+ return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n .", ",\n .", " {\n height: ", "px;\n width: ", "px;\n }\n .", " {\n .", " {\n ", "\n }\n }\n\n .", ":hover {\n background: ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_DELETE_BUTTON_WRAP, ClassName.CONTROLS_DELETE_BUTTON, tableDeleteButtonSize, tableDeleteButtonSize, ClassName.CONTROLS_DELETE_BUTTON_WRAP, ClassName.CONTROLS_DELETE_BUTTON, Button("\n background: ".concat(tableCellSelectedDeleteIconBackground(props), ";\n color: ").concat(tableCellSelectedDeleteIconColor(props), ";\n ")), ClassName.CONTROLS_DELETE_BUTTON, tableCellHoverDeleteIconBackground(props), tableCellHoverDeleteIconColor(props));
52
55
  };
53
56
  export var OverflowShadow = function OverflowShadow(props) {
54
- return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n .", ", .", " {\n display: block;\n height: calc(100% - ", "px);\n position: absolute;\n pointer-events: none;\n top: ", "px;\n z-index: ", ";\n width: ", "px;\n }\n .", " {\n background: linear-gradient(\n to left,\n transparent 0,\n ", "\n ", "%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n left: 0px;\n }\n .", "[data-number-column='true'] > :not(.", ").", " {\n left: ", "px;\n }\n .", " {\n background: linear-gradient(\n to right,\n transparent 0,\n ", "\n ", "%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: ", ";\n }\n .", " {\n .", ", .", " {\n height: calc(100% - ", "px);\n top: ", "px;\n }\n .", " {\n border-left: 1px solid ", ";\n }\n }\n"])), ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTop, tableMarginTop, akEditorShadowZIndex, getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? tableOverflowShadowWidthWide : tableOverflowShadowWidth, ClassName.TABLE_LEFT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? 140 : 100, "var(--ds-shadow-overflow-perimeter, transparent)", ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY_SHADOW, ClassName.TABLE_LEFT_SHADOW, akEditorTableNumberColumnWidth - 1, ClassName.TABLE_RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? 140 : 100, "var(--ds-shadow-overflow-perimeter, transparent)", getBooleanFF('platform.editor.custom-table-width') ? "calc(100% - ".concat(getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? tableOverflowShadowWidthWide : tableOverflowShadowWidth, "px)") : "calc(100% - ".concat(getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? tableOverflowShadowWidthWide - 10 : -2, "px)"), ClassName.WITH_CONTROLS, ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTopWithControl, tableMarginTopWithControl, ClassName.TABLE_LEFT_SHADOW, tableBorderColor(props));
57
+ return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n .", ", .", " {\n display: block;\n height: calc(100% - ", "px);\n position: absolute;\n pointer-events: none;\n top: ", "px;\n z-index: ", ";\n width: ", "px;\n }\n .", " {\n background: linear-gradient(\n to left,\n transparent 0,\n ", "\n ", "%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n left: 0px;\n }\n .", "[data-number-column='true'] > :not(.", ").", " {\n left: ", "px;\n }\n .", " {\n background: linear-gradient(\n to right,\n transparent 0,\n ", "\n ", "%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: ", ";\n }\n .", " {\n .", ", .", " {\n height: calc(100% - ", "px);\n top: ", "px;\n }\n .", " {\n border-left: 1px solid ", ";\n }\n }\n"])), ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTop, tableMarginTop, akEditorShadowZIndex, getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? tableOverflowShadowWidthWide : tableOverflowShadowWidth, ClassName.TABLE_LEFT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? 140 : 100, "var(--ds-shadow-overflow-perimeter, transparent)", ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY_SHADOW, ClassName.TABLE_LEFT_SHADOW, akEditorTableNumberColumnWidth - 1, ClassName.TABLE_RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? 140 : 100, "var(--ds-shadow-overflow-perimeter, transparent)", getBooleanFF('platform.editor.custom-table-width') ? "calc(100% - ".concat(getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? tableOverflowShadowWidthWide : tableOverflowShadowWidth, "px)") : "calc(100% - ".concat(getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? tableOverflowShadowWidthWide - 10 : -2, "px)"), ClassName.WITH_CONTROLS, ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTopWithControl, tableMarginTopWithControl, ClassName.TABLE_LEFT_SHADOW, tableBorderColor(props));
55
58
  };
56
59
  var columnHeaderButton = function columnHeaderButton(props, cssString) {
57
60
  if (getBooleanFF('platform.editor.table.column-controls-styles-updated')) {
58
- return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n background: ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n "])), tableHeaderCellBackgroundColor(props), cssString);
61
+ return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background: ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n "])), tableHeaderCellBackgroundColor(props), cssString);
59
62
  } else {
60
- return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n "])), tableHeaderCellBackgroundColor(props), tableBorderColor(props), cssString);
63
+ return css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n "])), tableHeaderCellBackgroundColor(props), tableBorderColor(props), cssString);
61
64
  }
62
65
  };
63
66
  var columnHeaderButtonSelected = function columnHeaderButtonSelected(props) {
64
- return css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), "var(--ds-text-inverse, ".concat(N0, ")"), tableToolbarSelectedColor(props), tableBorderSelectedColor(props), columnControlsSelectedZIndex);
67
+ return css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), "var(--ds-text-inverse, ".concat(N0, ")"), tableToolbarSelectedColor(props), tableBorderSelectedColor(props), columnControlsSelectedZIndex);
65
68
  };
66
69
  var getFloatingDotOverrides = function getFloatingDotOverrides(props) {
67
- return getBooleanFF('platform.editor.custom-table-width') ? css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n tr\n th:last-child\n .", "::before,\n tr\n td:last-child\n .", "::before {\n content: '';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: ", ";\n right: 0px;\n }\n "])), ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.COLUMN_CONTROLS_DECORATIONS, tableBorderColor(props), lineMarkerSize, lineMarkerSize, "var(--ds-space-025, 2px)") : '';
70
+ return getBooleanFF('platform.editor.custom-table-width') ? css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n tr\n th:last-child\n .", "::before,\n tr\n td:last-child\n .", "::before {\n content: '';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: ", ";\n right: 0px;\n }\n "])), ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.COLUMN_CONTROLS_DECORATIONS, tableBorderColor(props), lineMarkerSize, lineMarkerSize, "var(--ds-space-025, 2px)") : '';
68
71
  };
69
72
  export var floatingColumnControls = function floatingColumnControls(props) {
70
- return css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n .", " {\n box-sizing: border-box;\n position: absolute;\n top: 0;\n\n .", " {\n display: flex;\n flex-direction: row;\n }\n }\n\n .", " {\n box-sizing: border-box;\n\n .", " {\n display: grid;\n justify-items: center;\n }\n }\n "])), ClassName.COLUMN_DROP_TARGET_CONTROLS, ClassName.COLUMN_CONTROLS_INNER, ClassName.DRAG_COLUMN_CONTROLS, ClassName.COLUMN_CONTROLS_INNER);
73
+ return css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n .", " {\n box-sizing: border-box;\n position: absolute;\n top: 0;\n\n .", " {\n display: flex;\n flex-direction: row;\n }\n }\n\n .", " {\n box-sizing: border-box;\n\n .", " {\n display: grid;\n justify-items: center;\n }\n }\n "])), ClassName.DRAG_COLUMN_DROP_TARGET_CONTROLS, ClassName.DRAG_COLUMN_CONTROLS_INNER, ClassName.DRAG_COLUMN_CONTROLS, ClassName.DRAG_COLUMN_CONTROLS_INNER);
71
74
  };
72
75
  export var rowControlsWrapperDotStyle = function rowControlsWrapperDotStyle(props) {
73
76
  if (getBooleanFF('platform.editor.table.drag-and-drop')) {
74
- return css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n div.", ">.", "::after {\n display: none;\n }\n "])), ClassName.WITH_CONTROLS, ClassName.ROW_CONTROLS_WRAPPER);
77
+ return css(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n div.", ">.", "::after {\n display: none;\n }\n "])), ClassName.WITH_CONTROLS, ClassName.ROW_CONTROLS_WRAPPER);
75
78
  } else {
76
- return css(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n div.", ">.", "::after {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: -", "px;\n right: -1px;\n }\n "])), ClassName.WITH_CONTROLS, ClassName.ROW_CONTROLS_WRAPPER, tableBorderColor(props), lineMarkerSize, lineMarkerSize, tableToolbarSize + tableCellBorderWidth);
79
+ return css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n div.", ">.", "::after {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: -", "px;\n right: -1px;\n }\n "])), ClassName.WITH_CONTROLS, ClassName.ROW_CONTROLS_WRAPPER, tableBorderColor(props), lineMarkerSize, lineMarkerSize, tableToolbarSize + tableCellBorderWidth);
77
80
  }
78
81
  };
79
82
  export var columnControlsDecoration = function columnControlsDecoration(props) {
80
83
  if (getBooleanFF('platform.editor.table.column-controls-styles-updated')) {
81
- return css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: 100%;\n left: 0;\n top: -", "px;\n height: ", "px;\n // floating dot for adding column button\n &::before {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: 2px;\n right: -1px;\n }\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n // floating dot for adding column button - overriding style on last column to avoid scroll\n ", "\n\n .", " .", " {\n display: block;\n }\n\n table tr:first-of-type th.", " {\n &.", ", &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n }\n }\n }\n\n table tr:first-of-type th.", " {\n &.", ", &.", " {\n .", "::after {\n ", ";\n border-left: ", "px solid\n ", ";\n left: -", "px;\n }\n }\n }\n\n table tr:first-of-type th.", " {\n &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border-color: ", ";\n border-left: ", "px solid\n ", ";\n left: -", "px;\n z-index: ", ";\n }\n }\n }\n\n .", "\n table\n tr:first-of-type\n td.", ",\n .", "\n table\n tr:first-of-type\n th.", " {\n .", "::after {\n ", ";\n }\n }\n "])), ClassName.COLUMN_CONTROLS_DECORATIONS, columnControlsDecorationHeight + tableCellBorderWidth, columnControlsDecorationHeight, tableBorderColor(props), lineMarkerSize, lineMarkerSize, columnHeaderButton(props, "\n border-right: ".concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-top: ").concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-bottom: ").concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n box-sizing: content-box;\n height: ").concat(tableToolbarSize - 1, "px;\n width: 100%;\n position: absolute;\n top: ").concat(columnControlsDecorationHeight - tableToolbarSize, "px;\n left: 0px;\n z-index: ").concat(columnControlsZIndex, ";\n ")), getFloatingDotOverrides(props), ClassName.WITH_CONTROLS, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_TABLE, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), akEditorUnitZIndex * 100, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), tableCellBorderWidth, tableBorderSelectedColor(props), tableCellBorderWidth, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_COLUMN, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), tableCellBorderWidth, tableBorderDeleteColor(props), tableCellBorderWidth, akEditorUnitZIndex * 100, ClassName.TABLE_SELECTED, ClassName.TABLE_CELL, ClassName.TABLE_SELECTED, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props));
84
+ return css(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: 100%;\n left: 0;\n top: -", "px;\n height: ", "px;\n // floating dot for adding column button\n &::before {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: 2px;\n right: -1px;\n }\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n // floating dot for adding column button - overriding style on last column to avoid scroll\n ", "\n\n .", " .", " {\n display: block;\n }\n\n table tr:first-of-type th.", " {\n &.", ", &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n }\n }\n }\n\n table tr:first-of-type th.", " {\n &.", ", &.", " {\n .", "::after {\n ", ";\n border-left: ", "px solid\n ", ";\n left: -", "px;\n }\n }\n }\n\n table tr:first-of-type th.", " {\n &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border-color: ", ";\n border-left: ", "px solid\n ", ";\n left: -", "px;\n z-index: ", ";\n }\n }\n }\n\n .", "\n table\n tr:first-of-type\n td.", ",\n .", "\n table\n tr:first-of-type\n th.", " {\n .", "::after {\n ", ";\n }\n }\n "])), ClassName.COLUMN_CONTROLS_DECORATIONS, columnControlsDecorationHeight + tableCellBorderWidth, columnControlsDecorationHeight, tableBorderColor(props), lineMarkerSize, lineMarkerSize, columnHeaderButton(props, "\n border-right: ".concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-top: ").concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-bottom: ").concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n box-sizing: content-box;\n height: ").concat(tableToolbarSize - 1, "px;\n width: 100%;\n position: absolute;\n top: ").concat(columnControlsDecorationHeight - tableToolbarSize, "px;\n left: 0px;\n z-index: ").concat(columnControlsZIndex, ";\n ")), getFloatingDotOverrides(props), ClassName.WITH_CONTROLS, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_TABLE, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), akEditorUnitZIndex * 100, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), tableCellBorderWidth, tableBorderSelectedColor(props), tableCellBorderWidth, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_COLUMN, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), tableCellBorderWidth, tableBorderDeleteColor(props), tableCellBorderWidth, akEditorUnitZIndex * 100, ClassName.TABLE_SELECTED, ClassName.TABLE_CELL, ClassName.TABLE_SELECTED, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props));
82
85
  } else {
83
- return css(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: calc(100% + ", "px);\n left: -1px;\n top: -", "px;\n height: ", "px;\n // floating dot for adding column button\n &::before {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: 2px;\n right: -1px;\n }\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n // floating dot for adding column button - overriding style on last column to avoid scroll\n ", "\n\n .", " .", " {\n display: block;\n }\n\n table\n tr:first-of-type\n td.", ",\n table\n tr:first-of-type\n th.", " {\n &.", ",\n &.", ",\n &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border: 1px solid ", ";\n border-bottom: none;\n z-index: ", ";\n }\n }\n }\n\n .", "\n table\n tr:first-of-type\n td.", ",\n .", "\n table\n tr:first-of-type\n th.", " {\n .", "::after {\n ", ";\n }\n }\n "])), ClassName.COLUMN_CONTROLS_DECORATIONS, tableCellBorderWidth * 2, columnControlsDecorationHeight + tableCellBorderWidth, columnControlsDecorationHeight, tableBorderColor(props), lineMarkerSize, lineMarkerSize, columnHeaderButton(props, "\n border-right: ".concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-bottom: none;\n height: ").concat(tableToolbarSize, "px;\n width: 100%;\n position: absolute;\n top: ").concat(columnControlsDecorationHeight - tableToolbarSize, "px;\n left: 0px;\n z-index: ").concat(columnControlsZIndex, ";\n ")), getFloatingDotOverrides(props), ClassName.WITH_CONTROLS, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.HOVERED_TABLE, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), akEditorUnitZIndex * 100, ClassName.TABLE_SELECTED, ClassName.TABLE_CELL, ClassName.TABLE_SELECTED, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props));
86
+ return css(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: calc(100% + ", "px);\n left: -1px;\n top: -", "px;\n height: ", "px;\n // floating dot for adding column button\n &::before {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: 2px;\n right: -1px;\n }\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n // floating dot for adding column button - overriding style on last column to avoid scroll\n ", "\n\n .", " .", " {\n display: block;\n }\n\n table\n tr:first-of-type\n td.", ",\n table\n tr:first-of-type\n th.", " {\n &.", ",\n &.", ",\n &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border: 1px solid ", ";\n border-bottom: none;\n z-index: ", ";\n }\n }\n }\n\n .", "\n table\n tr:first-of-type\n td.", ",\n .", "\n table\n tr:first-of-type\n th.", " {\n .", "::after {\n ", ";\n }\n }\n "])), ClassName.COLUMN_CONTROLS_DECORATIONS, tableCellBorderWidth * 2, columnControlsDecorationHeight + tableCellBorderWidth, columnControlsDecorationHeight, tableBorderColor(props), lineMarkerSize, lineMarkerSize, columnHeaderButton(props, "\n border-right: ".concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-bottom: none;\n height: ").concat(tableToolbarSize, "px;\n width: 100%;\n position: absolute;\n top: ").concat(columnControlsDecorationHeight - tableToolbarSize, "px;\n left: 0px;\n z-index: ").concat(columnControlsZIndex, ";\n ")), getFloatingDotOverrides(props), ClassName.WITH_CONTROLS, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.HOVERED_TABLE, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props), ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), akEditorUnitZIndex * 100, ClassName.TABLE_SELECTED, ClassName.TABLE_CELL, ClassName.TABLE_SELECTED, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected(props));
84
87
  }
85
88
  };
86
89
  export var hoveredDeleteButton = function hoveredDeleteButton(props) {
87
- return css(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n .", ".", " {\n .", ",\n .", ",\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.SELECTED_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_CELL, tableBorderDeleteColor(props), ClassName.SELECTED_CELL, tableCellDeleteColor(props));
90
+ return css(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n .", ".", " {\n .", ",\n .", ",\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.SELECTED_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_CELL, tableBorderDeleteColor(props), ClassName.SELECTED_CELL, tableCellDeleteColor(props));
88
91
  };
89
92
  export var hoveredCell = function hoveredCell(props) {
90
- return css(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n .", " {\n position: relative;\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL, tableBorderSelectedColor(props));
93
+ return css(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n .", " {\n position: relative;\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL, tableBorderSelectedColor(props));
91
94
  };
92
- export var hoveredWarningCell = css(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n td.", " {\n background-color: ", " !important; // We need to override the background-color added to the cell\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL_WARNING, "var(--ds-background-warning, ".concat(Y50, ")"), "var(--ds-border-warning, ".concat(Y200, ")"));
95
+ export var hoveredWarningCell = css(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n td.", " {\n background-color: ", " !important; // We need to override the background-color added to the cell\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL_WARNING, "var(--ds-background-warning, ".concat(Y50, ")"), "var(--ds-border-warning, ".concat(Y200, ")"));
93
96
 
94
97
  // move the resize handle zone completely inside the table cell to avoid overflow
95
98
  var getLastColumnResizerOverrides = function getLastColumnResizerOverrides() {
96
- return getBooleanFF('platform.editor.custom-table-width') ? css(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n tr\n th:last-child\n .", ",\n tr\n td:last-child\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: 0;\n cursor: col-resize;\n z-index: ", ";\n }\n "])), ClassName.RESIZE_HANDLE_DECORATION, ClassName.RESIZE_HANDLE_DECORATION, resizeHandlerAreaWidth / 2, resizeHandlerZIndex) : '';
99
+ return getBooleanFF('platform.editor.custom-table-width') ? css(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n tr\n th:last-child\n .", ",\n tr\n td:last-child\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: 0;\n cursor: col-resize;\n z-index: ", ";\n }\n "])), ClassName.RESIZE_HANDLE_DECORATION, ClassName.RESIZE_HANDLE_DECORATION, resizeHandlerAreaWidth / 2, resizeHandlerZIndex) : '';
97
100
  };
98
101
  var resizeHandleOverrides = function resizeHandleOverrides(props) {
99
102
  if (getBooleanFF('platform.editor.table.drag-and-drop')) {
100
- return css(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n th.", "::before,\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before,\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n "])), ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2);
103
+ return css(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n th.", "::before,\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before,\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n "])), ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2);
101
104
  }
102
- return css(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n right: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n "])), ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableToolbarSize + tableCellBorderWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableToolbarSize + tableCellBorderWidth, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableToolbarSize + tableCellBorderWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableToolbarSize + tableCellBorderWidth);
105
+ return css(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n right: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n "])), ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableToolbarSize + tableCellBorderWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableToolbarSize + tableCellBorderWidth, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableToolbarSize + tableCellBorderWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableToolbarSize + tableCellBorderWidth);
103
106
  };
104
107
  export var resizeHandle = function resizeHandle(props) {
105
- return css(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n ", "\n\n ", "\n\n table\n tr:first-of-type\n th.", "\n .", "::after,\n table\n tr:first-of-type\n td.", "\n .", "::after {\n top: -", "px;\n height: calc(100% + ", "px);\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.RESIZE_HANDLE_DECORATION, resizeHandlerAreaWidth, resizeHandlerAreaWidth / 2, resizeHandlerZIndex, getLastColumnResizerOverrides(), resizeHandleOverrides(props), ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, tableToolbarSize + tableCellBorderWidth, tableToolbarSize + tableCellBorderWidth);
108
+ return css(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n ", "\n\n ", "\n\n table\n tr:first-of-type\n th.", "\n .", "::after,\n table\n tr:first-of-type\n td.", "\n .", "::after {\n top: -", "px;\n height: calc(100% + ", "px);\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.RESIZE_HANDLE_DECORATION, resizeHandlerAreaWidth, resizeHandlerAreaWidth / 2, resizeHandlerZIndex, getLastColumnResizerOverrides(), resizeHandleOverrides(props), ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, tableToolbarSize + tableCellBorderWidth, tableToolbarSize + tableCellBorderWidth);
106
109
  };
107
110
  export var insertLine = function insertLine(props) {
108
- return css(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n .", " {\n td.", "::before {\n content: ' ';\n position: absolute;\n left: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n right: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n height: ", "px;\n width: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n height: ", "px;\n width: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -1px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n bottom: 0;\n height: ", "px;\n width: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n bottom: 0;\n position: absolute;\n height: ", "px;\n width: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.WITH_FIRST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_FIRST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableCellBorderWidth, ClassName.WITH_COLUMN_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_COLUMN_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableCellBorderWidth, ClassName.WITH_LAST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_LAST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableCellBorderWidth, ClassName.WITH_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_LAST_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_LAST_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2);
111
+ return css(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n .", " {\n td.", "::before {\n content: ' ';\n position: absolute;\n left: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n right: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n height: ", "px;\n width: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n height: ", "px;\n width: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -1px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n bottom: 0;\n height: ", "px;\n width: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n bottom: 0;\n position: absolute;\n height: ", "px;\n width: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.WITH_FIRST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_FIRST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableCellBorderWidth, ClassName.WITH_COLUMN_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_COLUMN_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableCellBorderWidth, ClassName.WITH_LAST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_LAST_COLUMN_INSERT_LINE, insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableCellBorderWidth, ClassName.WITH_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_LAST_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_LAST_ROW_INSERT_LINE, "var(--ds-space-negative-025, -2px)", insertLineWidth, tableCellBorderWidth * 2, tableBorderSelectedColor(props), columnControlsZIndex * 2);
109
112
  };
@@ -31,7 +31,7 @@ export var isTableContainerOrWrapper = function isTableContainerOrWrapper(node)
31
31
  };
32
32
 
33
33
  /** drag-and-drop classes */
34
- export var isRowDragControlsButton = function isRowDragControlsButton(node) {
34
+ export var isDragRowControlsButton = function isDragRowControlsButton(node) {
35
35
  return containsClassName(node, ClassName.DRAG_ROW_CONTROLS) || closestElement(node, ".".concat(ClassName.DRAG_ROW_CONTROLS));
36
36
  };
37
37
  export var isDragRowFloatingInsertDot = function isDragRowFloatingInsertDot(node) {
@@ -40,6 +40,9 @@ export var isDragRowFloatingInsertDot = function isDragRowFloatingInsertDot(node
40
40
  export var isDragColumnFloatingInsertDot = function isDragColumnFloatingInsertDot(node) {
41
41
  return containsClassName(node, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER);
42
42
  };
43
+ export var isDragCornerButton = function isDragCornerButton(node) {
44
+ return containsClassName(node, ClassName.DRAG_CORNER_BUTTON) || containsClassName(node, ClassName.DRAG_CORNER_BUTTON_INNER);
45
+ };
43
46
 
44
47
  /*
45
48
  * This function returns which side of a given element the mouse cursor is,
@@ -95,14 +98,20 @@ export var isDragColumnFloatingInsertDot = function isDragColumnFloatingInsertDo
95
98
  * the same is valid to the right side.
96
99
  */
97
100
 
98
- export var getMousePositionHorizontalRelativeByElement = function getMousePositionHorizontalRelativeByElement(mouseEvent, elementContentRects, gapInPixels) {
101
+ export var getMousePositionHorizontalRelativeByElement = function getMousePositionHorizontalRelativeByElement(mouseEvent, elementContentRects, gapInPixels, isDragAndDropEnabled) {
99
102
  var element = mouseEvent.target;
100
103
  if (element instanceof HTMLElement) {
101
- var _closestCell$id, _elementContentRects$, _elementContentRects$2;
102
104
  var width, x;
103
- var closestCell = element.closest(SELECTOR_TABLE_LEAFS);
104
- var id = (_closestCell$id = closestCell === null || closestCell === void 0 ? void 0 : closestCell.id) !== null && _closestCell$id !== void 0 ? _closestCell$id : '';
105
- width = (_elementContentRects$ = elementContentRects === null || elementContentRects === void 0 || (_elementContentRects$2 = elementContentRects[id]) === null || _elementContentRects$2 === void 0 ? void 0 : _elementContentRects$2.width) !== null && _elementContentRects$ !== void 0 ? _elementContentRects$ : 0;
105
+ if (isDragAndDropEnabled) {
106
+ // mouse event fires for new overlapping column controls, so the cell can not get detected. Get width
107
+ // directly from element that will be .pm-table-drag-columns-floating-insert-dot-wrapper
108
+ width = element.clientWidth;
109
+ } else {
110
+ var _closestCell$id, _elementContentRects$, _elementContentRects$2;
111
+ var closestCell = element.closest(SELECTOR_TABLE_LEAFS);
112
+ var id = (_closestCell$id = closestCell === null || closestCell === void 0 ? void 0 : closestCell.id) !== null && _closestCell$id !== void 0 ? _closestCell$id : '';
113
+ width = (_elementContentRects$ = elementContentRects === null || elementContentRects === void 0 || (_elementContentRects$2 = elementContentRects[id]) === null || _elementContentRects$2 === void 0 ? void 0 : _elementContentRects$2.width) !== null && _elementContentRects$ !== void 0 ? _elementContentRects$ : 0;
114
+ }
106
115
  x = mouseEvent.offsetX;
107
116
  if (width <= 0) {
108
117
  return null;
@@ -1,5 +1,20 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
3
+ import { addColumnAfter, addColumnBefore, addRowAfter, addRowBefore, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
4
+ import ArrowDownIcon from '@atlaskit/icon/glyph/arrow-down';
5
+ import ArrowLeftIcon from '@atlaskit/icon/glyph/arrow-left';
6
+ import ArrowRightIcon from '@atlaskit/icon/glyph/arrow-right';
7
+ import ArrowUpIcon from '@atlaskit/icon/glyph/arrow-up';
8
+ import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
9
+ import EditorLayoutThreeEqualIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
10
+ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
11
+ import HipchatChevronDoubleDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-down';
12
+ import HipchatChevronDoubleUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-up';
13
+ import { clearMultipleCells, insertColumn, insertRow, sortByColumn } from '../commands';
14
+ import { deleteColumnsCommand } from '../commands/delete';
2
15
  import { moveSource } from '../pm-plugins/drag-and-drop/commands';
16
+ import { deleteRows } from '../transforms';
17
+ import { AddColLeftIcon, AddColRightIcon, AddRowAboveIcon, AddRowBelowIcon } from '../ui/icons';
3
18
  var canDecrease = function canDecrease(index) {
4
19
  var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
5
20
  return index !== undefined && index > min;
@@ -8,38 +23,122 @@ var canIncrease = function canIncrease(index) {
8
23
  var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
9
24
  return index !== undefined && index < max;
10
25
  };
11
- export var getDragMenuConfig = function getDragMenuConfig(direction, tableMap, index) {
26
+ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorContainerWidth, tableMap, index, targetCellPosition, selectionRect) {
27
+ var addOptions = direction === 'row' ? [{
28
+ label: 'above',
29
+ offset: 0,
30
+ icon: AddRowAboveIcon,
31
+ keymap: addRowBefore
32
+ }, {
33
+ label: 'below',
34
+ offset: 1,
35
+ icon: AddRowBelowIcon,
36
+ keymap: addRowAfter
37
+ }] : [{
38
+ label: 'left',
39
+ offset: 0,
40
+ icon: AddColLeftIcon,
41
+ keymap: addColumnBefore
42
+ }, {
43
+ label: 'right',
44
+ offset: 1,
45
+ icon: AddColRightIcon,
46
+ keymap: addColumnAfter
47
+ }];
12
48
  var moveOptions = direction === 'row' ? [{
13
49
  label: 'up',
14
50
  offset: -1,
15
- canMove: canDecrease
51
+ canMove: canDecrease,
52
+ icon: ArrowUpIcon
16
53
  }, {
17
54
  label: 'down',
18
55
  offset: 1,
19
56
  canMove: function canMove(index) {
20
57
  var _tableMap$height;
21
58
  return canIncrease(index, ((_tableMap$height = tableMap === null || tableMap === void 0 ? void 0 : tableMap.height) !== null && _tableMap$height !== void 0 ? _tableMap$height : 0) - 1);
22
- }
59
+ },
60
+ icon: ArrowDownIcon
23
61
  }] : [{
24
62
  label: 'left',
25
63
  offset: -1,
26
- canMove: canDecrease
64
+ canMove: canDecrease,
65
+ icon: ArrowLeftIcon
27
66
  }, {
28
67
  label: 'right',
29
68
  offset: 1,
30
69
  canMove: function canMove(index) {
31
70
  var _tableMap$width;
32
71
  return canIncrease(index, ((_tableMap$width = tableMap === null || tableMap === void 0 ? void 0 : tableMap.width) !== null && _tableMap$width !== void 0 ? _tableMap$width : 0) - 1);
33
- }
72
+ },
73
+ icon: ArrowRightIcon
34
74
  }];
35
- return _toConsumableArray(moveOptions.map(function (_ref) {
75
+ var sortOptions = direction === 'column' ? [{
76
+ label: 'increasing',
77
+ order: SortOrder.ASC,
78
+ icon: HipchatChevronDoubleUpIcon
79
+ }, {
80
+ label: 'decreasing',
81
+ order: SortOrder.DESC,
82
+ icon: HipchatChevronDoubleDownIcon
83
+ }] : [];
84
+ return [].concat(_toConsumableArray(addOptions.map(function (_ref) {
36
85
  var label = _ref.label,
37
86
  offset = _ref.offset,
38
- canMove = _ref.canMove;
87
+ icon = _ref.icon,
88
+ keymap = _ref.keymap;
89
+ return {
90
+ id: "add_".concat(direction, "_").concat(label),
91
+ title: "Add ".concat(direction, " ").concat(label),
92
+ icon: icon,
93
+ onClick: function onClick(state, dispatch) {
94
+ if (direction === 'row') {
95
+ insertRow(index + offset, true)(state, dispatch);
96
+ } else {
97
+ insertColumn(getEditorContainerWidth)(index + offset)(state, dispatch);
98
+ }
99
+ return true;
100
+ },
101
+ keymap: keymap && tooltip(keymap)
102
+ };
103
+ })), [direction === 'column' ? {
104
+ id: 'distribute_columns',
105
+ title: 'Distribute columns',
106
+ disabled: true,
107
+ onClick: function onClick() {
108
+ return false;
109
+ },
110
+ icon: EditorLayoutThreeEqualIcon
111
+ } : undefined, {
112
+ id: 'clear_cells',
113
+ title: 'Clear cells',
114
+ onClick: function onClick(state, dispatch) {
115
+ clearMultipleCells(targetCellPosition)(state, dispatch);
116
+ return true;
117
+ },
118
+ icon: CrossCircleIcon,
119
+ keymap: tooltip(backspace)
120
+ }, {
121
+ id: "delete_".concat(direction),
122
+ title: "Delete ".concat(direction),
123
+ onClick: function onClick(state, dispatch) {
124
+ if (direction === 'row') {
125
+ dispatch === null || dispatch === void 0 || dispatch(deleteRows(selectionRect, false)(state.tr));
126
+ } else {
127
+ deleteColumnsCommand(selectionRect)(state, dispatch);
128
+ }
129
+ return true;
130
+ },
131
+ icon: RemoveIcon
132
+ }], _toConsumableArray(moveOptions.map(function (_ref2) {
133
+ var label = _ref2.label,
134
+ offset = _ref2.offset,
135
+ canMove = _ref2.canMove,
136
+ icon = _ref2.icon;
39
137
  return {
40
138
  id: "move_".concat(direction, "_").concat(label),
41
139
  title: "Move ".concat(direction, " ").concat(label),
42
140
  disabled: !canMove(index),
141
+ icon: icon,
43
142
  onClick: function onClick(state, dispatch) {
44
143
  if (canMove(index)) {
45
144
  moveSource("table-".concat(direction), index, index + offset)(state, dispatch);
@@ -48,5 +147,18 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, tableMap, i
48
147
  return false;
49
148
  }
50
149
  };
51
- }));
150
+ })), _toConsumableArray(sortOptions.map(function (_ref3) {
151
+ var label = _ref3.label,
152
+ order = _ref3.order,
153
+ icon = _ref3.icon;
154
+ return {
155
+ id: "sort_column_".concat(order),
156
+ title: "Sort ".concat(label),
157
+ icon: icon,
158
+ onClick: function onClick(state, dispatch) {
159
+ sortByColumn(index, order)(state, dispatch);
160
+ return true;
161
+ }
162
+ };
163
+ }))).filter(Boolean);
52
164
  };
@@ -2,7 +2,7 @@ export { getSelectedColumnIndexes, getSelectedRowIndexes, normalizeSelection, is
2
2
  export { findControlsHoverDecoration, createControlsHoverDecoration, createColumnControlsDecoration, createColumnSelectedDecoration, createCellHoverDecoration, updateDecorations, createResizeHandleDecoration, createColumnInsertLine, createColumnLineResize, createRowInsertLine } from './decoration';
3
3
  export { isIsolating, containsHeaderColumn, containsHeaderRow, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled, isLayoutSupported, getTableWidth, tablesHaveDifferentColumnWidths, tablesHaveDifferentNoOfColumns, isTableNested, anyChildCellMergedAcrossRow, supportedHeaderRow } from './nodes';
4
4
  export { unwrapContentFromTable, removeTableFromFirstChild, removeTableFromLastChild, transformSliceToRemoveOpenTable, transformSliceToCorrectEmptyTableCells, transformSliceToFixHardBreakProblemOnCopyFromCell } from './paste';
5
- export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowDragControlsButton, isRowControlsButton, isDragColumnFloatingInsertDot, isDragRowFloatingInsertDot, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler } from './dom';
5
+ export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowControlsButton, isDragRowControlsButton, isDragColumnFloatingInsertDot, isDragRowFloatingInsertDot, isDragCornerButton, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler } from './dom';
6
6
  export { getColumnsWidths, isColumnDeleteButtonVisible, getColumnDeleteButtonParams, getColumnClassNames } from './column-controls';
7
7
  export { getRowHeights, isRowDeleteButtonVisible, getRowDeleteButtonParams, getRowsParams, getRowClassNames, copyPreviousRow } from './row-controls';
8
8
  export { getSelectedTableInfo, getSelectedCellInfo } from './analytics';
@@ -253,9 +253,6 @@ export declare const TableCssClassName: {
253
253
  COLUMN_CONTROLS: string;
254
254
  COLUMN_CONTROLS_DECORATIONS: string;
255
255
  COLUMN_SELECTED: string;
256
- COLUMN_CONTROLS_WRAPPER: string;
257
- COLUMN_DROP_TARGET_CONTROLS: string;
258
- COLUMN_CONTROLS_INNER: string;
259
256
  ROW_CONTROLS_WRAPPER: string;
260
257
  ROW_CONTROLS: string;
261
258
  ROW_CONTROLS_INNER: string;
@@ -290,7 +287,12 @@ export declare const TableCssClassName: {
290
287
  DRAG_COLUMN_CONTROLS: string;
291
288
  DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER: string;
292
289
  DRAG_COLUMN_FLOATING_INSERT_DOT: string;
290
+ DRAG_COLUMN_CONTROLS_WRAPPER: string;
291
+ DRAG_COLUMN_DROP_TARGET_CONTROLS: string;
292
+ DRAG_COLUMN_CONTROLS_INNER: string;
293
293
  DRAG_HANDLE_BUTTON_CONTAINER: string;
294
+ DRAG_CORNER_BUTTON: string;
295
+ DRAG_CORNER_BUTTON_INNER: string;
294
296
  /** Other classes */
295
297
  NUMBERED_COLUMN: string;
296
298
  NUMBERED_COLUMN_BUTTON: string;
@@ -1,4 +1,6 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
4
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
3
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
6
  import type { PluginConfig, TableDirection } from '../../types';
@@ -14,6 +16,7 @@ type DragMenuProps = {
14
16
  boundariesElement?: HTMLElement;
15
17
  scrollableElement?: HTMLElement;
16
18
  pluginConfig?: PluginConfig;
19
+ getEditorContainerWidth: GetEditorContainerWidth;
17
20
  };
18
- export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, }: DragMenuProps) => JSX.Element | null;
21
+ export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, targetCellPosition, getEditorContainerWidth, }: DragMenuProps) => jsx.JSX.Element | null;
19
22
  export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
3
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
3
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  import type { TableDirection } from '../../types';
@@ -13,9 +14,10 @@ export interface Props {
13
14
  direction?: TableDirection;
14
15
  index?: number;
15
16
  targetCellPosition?: number;
17
+ getEditorContainerWidth: GetEditorContainerWidth;
16
18
  }
17
19
  declare const FloatingDragMenu: {
18
- ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableRef, tableNode, direction, index, targetCellPosition, }: Props): JSX.Element | null;
20
+ ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableRef, tableNode, direction, index, targetCellPosition, getEditorContainerWidth, }: Props): JSX.Element | null;
19
21
  displayName: string;
20
22
  };
21
23
  export default FloatingDragMenu;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
3
+ import type { CornerControlProps } from './types';
4
+ export declare const CornerControls: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps<"intl">>> & {
5
+ WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps<"intl">>;
6
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
3
+ import type { CornerControlProps } from './types';
4
+ export declare const DragCornerControls: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps<"intl">>> & {
5
+ WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps<"intl">>;
6
+ };
@@ -1,16 +1,2 @@
1
- import React from 'react';
2
- import type { WrappedComponentProps } from 'react-intl-next';
3
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- export interface Props {
5
- editorView: EditorView;
6
- tableRef?: HTMLTableElement;
7
- isInDanger?: boolean;
8
- isResizing?: boolean;
9
- hoveredRows?: number[];
10
- isHeaderColumnEnabled?: boolean;
11
- isHeaderRowEnabled?: boolean;
12
- stickyTop?: number;
13
- }
14
- export declare const CornerControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
15
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
16
- };
1
+ export { CornerControls } from './ClassicCornerControls';
2
+ export { DragCornerControls } from './DragCornerControls';
@@ -0,0 +1,11 @@
1
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
+ export type CornerControlProps = {
3
+ editorView: EditorView;
4
+ tableRef?: HTMLTableElement;
5
+ isInDanger?: boolean;
6
+ isResizing?: boolean;
7
+ hoveredRows?: number[];
8
+ isHeaderColumnEnabled?: boolean;
9
+ isHeaderRowEnabled?: boolean;
10
+ stickyTop?: number;
11
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddColLeftIcon: () => JSX.Element;