@atlaskit/editor-plugin-table 12.2.5 → 12.2.7

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 (207) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +24 -2
  3. package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +23 -1
  4. package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +24 -2
  5. package/package.json +4 -4
  6. package/afm-cc/tsconfig.json +0 -123
  7. package/afm-dev-agents/tsconfig.json +0 -123
  8. package/afm-jira/tsconfig.json +0 -123
  9. package/afm-passionfruit/tsconfig.json +0 -123
  10. package/afm-post-office/tsconfig.json +0 -123
  11. package/afm-rovo-extension/tsconfig.json +0 -123
  12. package/afm-townsquare/tsconfig.json +0 -123
  13. package/afm-volt/tsconfig.json +0 -114
  14. package/build/tsconfig.json +0 -23
  15. package/docs/0-intro.tsx +0 -57
  16. package/src/index.ts +0 -21
  17. package/src/nodeviews/ExternalDropTargets.tsx +0 -91
  18. package/src/nodeviews/OverflowShadowsObserver.ts +0 -156
  19. package/src/nodeviews/TableCell.ts +0 -134
  20. package/src/nodeviews/TableComponent.tsx +0 -1590
  21. package/src/nodeviews/TableComponentWithSharedState.tsx +0 -278
  22. package/src/nodeviews/TableContainer.tsx +0 -926
  23. package/src/nodeviews/TableNodeViewBase.ts +0 -29
  24. package/src/nodeviews/TableResizer.tsx +0 -884
  25. package/src/nodeviews/TableRow.ts +0 -830
  26. package/src/nodeviews/TableStickyScrollbar.ts +0 -211
  27. package/src/nodeviews/__mocks__/OverflowShadowsObserver.ts +0 -15
  28. package/src/nodeviews/__mocks__/OverridableMock.ts +0 -26
  29. package/src/nodeviews/table-container-styles.ts +0 -9
  30. package/src/nodeviews/table-node-views.ts +0 -76
  31. package/src/nodeviews/table.tsx +0 -530
  32. package/src/nodeviews/toDOM.ts +0 -244
  33. package/src/nodeviews/types.ts +0 -36
  34. package/src/nodeviews/update-overflow-shadows.ts +0 -11
  35. package/src/pm-plugins/analytics/actions.ts +0 -21
  36. package/src/pm-plugins/analytics/commands.ts +0 -47
  37. package/src/pm-plugins/analytics/plugin-factory.ts +0 -9
  38. package/src/pm-plugins/analytics/plugin-key.ts +0 -5
  39. package/src/pm-plugins/analytics/plugin.ts +0 -80
  40. package/src/pm-plugins/analytics/reducer.ts +0 -27
  41. package/src/pm-plugins/analytics/types.ts +0 -20
  42. package/src/pm-plugins/analytics/utils/moved-event.ts +0 -51
  43. package/src/pm-plugins/commands/clear.ts +0 -43
  44. package/src/pm-plugins/commands/collapse.ts +0 -17
  45. package/src/pm-plugins/commands/column-resize.ts +0 -478
  46. package/src/pm-plugins/commands/commands-with-analytics.ts +0 -715
  47. package/src/pm-plugins/commands/delete.ts +0 -42
  48. package/src/pm-plugins/commands/display-mode.ts +0 -18
  49. package/src/pm-plugins/commands/go-to-next-cell.ts +0 -198
  50. package/src/pm-plugins/commands/hover.ts +0 -242
  51. package/src/pm-plugins/commands/index.ts +0 -51
  52. package/src/pm-plugins/commands/insert.ts +0 -438
  53. package/src/pm-plugins/commands/misc.ts +0 -811
  54. package/src/pm-plugins/commands/referentiality.ts +0 -15
  55. package/src/pm-plugins/commands/selection.ts +0 -537
  56. package/src/pm-plugins/commands/sort.ts +0 -102
  57. package/src/pm-plugins/commands/split-cell.ts +0 -28
  58. package/src/pm-plugins/commands/toggle.ts +0 -109
  59. package/src/pm-plugins/create-plugin-config.ts +0 -17
  60. package/src/pm-plugins/decorations/plugin.ts +0 -107
  61. package/src/pm-plugins/decorations/utils/column-controls.ts +0 -91
  62. package/src/pm-plugins/decorations/utils/column-resizing.ts +0 -71
  63. package/src/pm-plugins/decorations/utils/compose-decorations.ts +0 -9
  64. package/src/pm-plugins/decorations/utils/types.ts +0 -16
  65. package/src/pm-plugins/default-table-selection.ts +0 -14
  66. package/src/pm-plugins/drag-and-drop/actions.ts +0 -48
  67. package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +0 -222
  68. package/src/pm-plugins/drag-and-drop/commands.ts +0 -194
  69. package/src/pm-plugins/drag-and-drop/consts.ts +0 -7
  70. package/src/pm-plugins/drag-and-drop/plugin-factory.ts +0 -33
  71. package/src/pm-plugins/drag-and-drop/plugin-key.ts +0 -5
  72. package/src/pm-plugins/drag-and-drop/plugin.ts +0 -398
  73. package/src/pm-plugins/drag-and-drop/reducer.ts +0 -38
  74. package/src/pm-plugins/drag-and-drop/types.ts +0 -18
  75. package/src/pm-plugins/drag-and-drop/utils/autoscrollers.ts +0 -49
  76. package/src/pm-plugins/drag-and-drop/utils/getDragBehaviour.ts +0 -9
  77. package/src/pm-plugins/drag-and-drop/utils/monitor.ts +0 -73
  78. package/src/pm-plugins/handlers.ts +0 -161
  79. package/src/pm-plugins/keymap.ts +0 -436
  80. package/src/pm-plugins/main.ts +0 -433
  81. package/src/pm-plugins/plugin-factory.ts +0 -42
  82. package/src/pm-plugins/plugin-key.ts +0 -8
  83. package/src/pm-plugins/reducer.ts +0 -145
  84. package/src/pm-plugins/safari-delete-composition-text-issue-workaround.ts +0 -102
  85. package/src/pm-plugins/sticky-headers/commands.ts +0 -8
  86. package/src/pm-plugins/sticky-headers/plugin-key.ts +0 -5
  87. package/src/pm-plugins/sticky-headers/plugin-state.ts +0 -52
  88. package/src/pm-plugins/sticky-headers/plugin.ts +0 -12
  89. package/src/pm-plugins/sticky-headers/types.ts +0 -20
  90. package/src/pm-plugins/sticky-headers/util.ts +0 -18
  91. package/src/pm-plugins/table-analytics.ts +0 -100
  92. package/src/pm-plugins/table-local-id.ts +0 -213
  93. package/src/pm-plugins/table-resizing/commands.ts +0 -116
  94. package/src/pm-plugins/table-resizing/event-handlers.ts +0 -352
  95. package/src/pm-plugins/table-resizing/plugin-factory.ts +0 -29
  96. package/src/pm-plugins/table-resizing/plugin-key.ts +0 -5
  97. package/src/pm-plugins/table-resizing/plugin.ts +0 -94
  98. package/src/pm-plugins/table-resizing/reducer.ts +0 -37
  99. package/src/pm-plugins/table-resizing/utils/colgroup.ts +0 -306
  100. package/src/pm-plugins/table-resizing/utils/column-state.ts +0 -120
  101. package/src/pm-plugins/table-resizing/utils/consts.ts +0 -11
  102. package/src/pm-plugins/table-resizing/utils/content-width.ts +0 -118
  103. package/src/pm-plugins/table-resizing/utils/dom.ts +0 -132
  104. package/src/pm-plugins/table-resizing/utils/misc.ts +0 -282
  105. package/src/pm-plugins/table-resizing/utils/resize-column.ts +0 -34
  106. package/src/pm-plugins/table-resizing/utils/resize-logic.ts +0 -289
  107. package/src/pm-plugins/table-resizing/utils/resize-state.ts +0 -417
  108. package/src/pm-plugins/table-resizing/utils/scale-table.ts +0 -290
  109. package/src/pm-plugins/table-resizing/utils/types.ts +0 -25
  110. package/src/pm-plugins/table-resizing/utils/unit-to-number.ts +0 -1
  111. package/src/pm-plugins/table-selection-keymap.ts +0 -64
  112. package/src/pm-plugins/table-size-selector.ts +0 -39
  113. package/src/pm-plugins/table-width-in-comment-fix.ts +0 -113
  114. package/src/pm-plugins/table-width.ts +0 -153
  115. package/src/pm-plugins/transforms/column-width.ts +0 -249
  116. package/src/pm-plugins/transforms/delete-columns.ts +0 -281
  117. package/src/pm-plugins/transforms/delete-rows.ts +0 -154
  118. package/src/pm-plugins/transforms/fix-tables.ts +0 -249
  119. package/src/pm-plugins/transforms/merge.ts +0 -301
  120. package/src/pm-plugins/transforms/replace-table.ts +0 -38
  121. package/src/pm-plugins/transforms/split.ts +0 -90
  122. package/src/pm-plugins/utils/alignment.ts +0 -33
  123. package/src/pm-plugins/utils/analytics.ts +0 -238
  124. package/src/pm-plugins/utils/collapse.ts +0 -93
  125. package/src/pm-plugins/utils/column-controls.ts +0 -250
  126. package/src/pm-plugins/utils/create.ts +0 -64
  127. package/src/pm-plugins/utils/decoration.ts +0 -672
  128. package/src/pm-plugins/utils/dom.ts +0 -251
  129. package/src/pm-plugins/utils/drag-menu.tsx +0 -491
  130. package/src/pm-plugins/utils/get-allow-add-column-custom-step.ts +0 -10
  131. package/src/pm-plugins/utils/guidelines.ts +0 -30
  132. package/src/pm-plugins/utils/merged-cells.ts +0 -239
  133. package/src/pm-plugins/utils/nodes.ts +0 -162
  134. package/src/pm-plugins/utils/paste.ts +0 -386
  135. package/src/pm-plugins/utils/row-controls.ts +0 -211
  136. package/src/pm-plugins/utils/selection.ts +0 -17
  137. package/src/pm-plugins/utils/snapping.ts +0 -136
  138. package/src/pm-plugins/utils/table.ts +0 -60
  139. package/src/pm-plugins/utils/update-plugin-state-decorations.ts +0 -13
  140. package/src/pm-plugins/view-mode-sort/consts.ts +0 -3
  141. package/src/pm-plugins/view-mode-sort/index.ts +0 -291
  142. package/src/pm-plugins/view-mode-sort/plugin-key.ts +0 -7
  143. package/src/pm-plugins/view-mode-sort/types.ts +0 -23
  144. package/src/pm-plugins/view-mode-sort/utils.ts +0 -136
  145. package/src/tablePlugin.tsx +0 -971
  146. package/src/tablePluginType.ts +0 -102
  147. package/src/types/index.ts +0 -592
  148. package/src/ui/ColumnResizeWidget/index.tsx +0 -61
  149. package/src/ui/ContentComponent.tsx +0 -311
  150. package/src/ui/DragHandle/HandleIconComponent.tsx +0 -21
  151. package/src/ui/DragHandle/index.tsx +0 -391
  152. package/src/ui/DragPreview/index.tsx +0 -51
  153. package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +0 -59
  154. package/src/ui/FloatingContextualButton/FixedButton.tsx +0 -203
  155. package/src/ui/FloatingContextualButton/index.tsx +0 -168
  156. package/src/ui/FloatingContextualButton/styles.ts +0 -69
  157. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +0 -931
  158. package/src/ui/FloatingContextualMenu/index.tsx +0 -141
  159. package/src/ui/FloatingContextualMenu/styles.ts +0 -77
  160. package/src/ui/FloatingDeleteButton/DeleteButton.tsx +0 -54
  161. package/src/ui/FloatingDeleteButton/getPopUpOptions.ts +0 -65
  162. package/src/ui/FloatingDeleteButton/index.tsx +0 -383
  163. package/src/ui/FloatingDeleteButton/types.ts +0 -3
  164. package/src/ui/FloatingDragMenu/DragMenu.tsx +0 -668
  165. package/src/ui/FloatingDragMenu/DropdownMenu.tsx +0 -221
  166. package/src/ui/FloatingDragMenu/index.tsx +0 -136
  167. package/src/ui/FloatingDragMenu/styles.ts +0 -83
  168. package/src/ui/FloatingInsertButton/InsertButton.tsx +0 -263
  169. package/src/ui/FloatingInsertButton/getPopupOptions.ts +0 -131
  170. package/src/ui/FloatingInsertButton/index.tsx +0 -314
  171. package/src/ui/FloatingToolbarLabel/FloatingToolbarLabel.tsx +0 -31
  172. package/src/ui/SizeSelector/index.tsx +0 -74
  173. package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +0 -397
  174. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +0 -105
  175. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +0 -63
  176. package/src/ui/TableFloatingColumnControls/index.tsx +0 -151
  177. package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +0 -106
  178. package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +0 -143
  179. package/src/ui/TableFloatingControls/CornerControls/types.ts +0 -12
  180. package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +0 -88
  181. package/src/ui/TableFloatingControls/NumberColumn/index.tsx +0 -150
  182. package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +0 -131
  183. package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +0 -429
  184. package/src/ui/TableFloatingControls/RowDropTarget/index.tsx +0 -96
  185. package/src/ui/TableFloatingControls/index.tsx +0 -275
  186. package/src/ui/TableFullWidthLabel/index.tsx +0 -38
  187. package/src/ui/common-styles.ts +0 -1218
  188. package/src/ui/consts.ts +0 -109
  189. package/src/ui/event-handlers.ts +0 -662
  190. package/src/ui/global-styles.tsx +0 -55
  191. package/src/ui/hooks/useInternalTablePluginStateSelector.ts +0 -38
  192. package/src/ui/icons/AddColLeftIcon.tsx +0 -37
  193. package/src/ui/icons/AddColRightIcon.tsx +0 -37
  194. package/src/ui/icons/AddRowAboveIcon.tsx +0 -22
  195. package/src/ui/icons/AddRowBelowIcon.tsx +0 -39
  196. package/src/ui/icons/DragHandleDisabledIcon.tsx +0 -25
  197. package/src/ui/icons/DragHandleIcon.tsx +0 -16
  198. package/src/ui/icons/DragInMotionIcon.tsx +0 -54
  199. package/src/ui/icons/MergeCellsIcon.tsx +0 -26
  200. package/src/ui/icons/MinimisedHandle.tsx +0 -15
  201. package/src/ui/icons/SortingIconWrapper.tsx +0 -43
  202. package/src/ui/icons/SplitCellIcon.tsx +0 -34
  203. package/src/ui/toolbar.tsx +0 -1153
  204. package/src/ui/ui-styles.ts +0 -960
  205. package/tsconfig.app.json +0 -135
  206. package/tsconfig.dev.json +0 -54
  207. package/tsconfig.json +0 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 12.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`098cfbb01dc36`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/098cfbb01dc36) -
8
+ Add missing npmignore files to remove unnecessary files from published package
9
+ - Updated dependencies
10
+
11
+ ## 12.2.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [`83a86aaf799cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/83a86aaf799cc) -
16
+ hide numbered column on SSR
17
+
3
18
  ## 12.2.5
4
19
 
5
20
  ### Patch Changes
@@ -14,13 +14,17 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireWildcard(require("react"));
16
16
  var _classnames2 = _interopRequireDefault(require("classnames"));
17
+ var _coreUtils = require("@atlaskit/editor-common/core-utils");
17
18
  var _state = require("@atlaskit/editor-prosemirror/state");
18
19
  var _utils = require("@atlaskit/editor-tables/utils");
20
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
19
21
  var _commands = require("../../../pm-plugins/commands");
20
22
  var _rowControls = require("../../../pm-plugins/utils/row-controls");
21
23
  var _types = require("../../../types");
22
24
  var _consts = require("../../consts");
23
25
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
26
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
27
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24
28
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
25
29
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
30
  // Ignored via go/ees005
@@ -109,16 +113,34 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
109
113
  tableActive = _this$props5.tableActive,
110
114
  updateCellHoverLocation = _this$props5.updateCellHoverLocation;
111
115
  var rowHeights = (0, _rowControls.getRowHeights)(tableRef);
116
+ if ((0, _coreUtils.isSSR)() && (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true)) {
117
+ return /*#__PURE__*/_react.default.createElement("div", {
118
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
119
+ className: _types.TableCssClassName.NUMBERED_COLUMN,
120
+ style: {
121
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
122
+ marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
123
+ borderLeft:
124
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
125
+ isDragAndDropEnabled && tableActive ? "1px solid ".concat(_consts.tableBorderColor) : undefined,
126
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
127
+ visibility: 'hidden' // Ensure the column is not visible during SSR
128
+ },
129
+ contentEditable: false
130
+ });
131
+ }
112
132
  return /*#__PURE__*/_react.default.createElement("div", {
113
133
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
114
134
  className: _types.TableCssClassName.NUMBERED_COLUMN,
115
- style: {
135
+ style: _objectSpread({
116
136
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
117
137
  marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
118
138
  borderLeft:
119
139
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
120
140
  isDragAndDropEnabled && tableActive ? "1px solid ".concat(_consts.tableBorderColor) : undefined
121
- },
141
+ }, (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) ? {
142
+ visibility: 'visible'
143
+ } : {}),
122
144
  contentEditable: false
123
145
  }, rowHeights.map(function (rowHeight, index) {
124
146
  return isDragAndDropEnabled ?
@@ -1,8 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React, { Component } from 'react';
3
3
  import classnames from 'classnames';
4
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
4
5
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
6
  import { isRowSelected } from '@atlaskit/editor-tables/utils';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
8
  import { clearHoverSelection } from '../../../pm-plugins/commands';
7
9
  import { getRowHeights } from '../../../pm-plugins/utils/row-controls';
8
10
  import { TableCssClassName as ClassName } from '../../../types';
@@ -94,6 +96,22 @@ export default class NumberColumn extends Component {
94
96
  updateCellHoverLocation
95
97
  } = this.props;
96
98
  const rowHeights = getRowHeights(tableRef);
99
+ if (isSSR() && expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
100
+ return /*#__PURE__*/React.createElement("div", {
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
102
+ className: ClassName.NUMBERED_COLUMN,
103
+ style: {
104
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
105
+ marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
106
+ borderLeft:
107
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
108
+ isDragAndDropEnabled && tableActive ? `1px solid ${tableBorderColor}` : undefined,
109
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
110
+ visibility: 'hidden' // Ensure the column is not visible during SSR
111
+ },
112
+ contentEditable: false
113
+ });
114
+ }
97
115
  return /*#__PURE__*/React.createElement("div", {
98
116
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
99
117
  className: ClassName.NUMBERED_COLUMN,
@@ -102,7 +120,11 @@ export default class NumberColumn extends Component {
102
120
  marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
103
121
  borderLeft:
104
122
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
105
- isDragAndDropEnabled && tableActive ? `1px solid ${tableBorderColor}` : undefined
123
+ isDragAndDropEnabled && tableActive ? `1px solid ${tableBorderColor}` : undefined,
124
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
125
+ ...(expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? {
126
+ visibility: 'visible'
127
+ } : {})
106
128
  },
107
129
  contentEditable: false
108
130
  }, rowHeights.map((rowHeight, index) => isDragAndDropEnabled ?
@@ -4,12 +4,16 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
4
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
5
  import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
9
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
11
  import React, { Component } from 'react';
10
12
  import classnames from 'classnames';
13
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
11
14
  import { Selection } from '@atlaskit/editor-prosemirror/state';
12
15
  import { isRowSelected } from '@atlaskit/editor-tables/utils';
16
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
17
  import { clearHoverSelection } from '../../../pm-plugins/commands';
14
18
  import { getRowHeights } from '../../../pm-plugins/utils/row-controls';
15
19
  import { TableCssClassName as ClassName } from '../../../types';
@@ -100,16 +104,34 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
100
104
  tableActive = _this$props5.tableActive,
101
105
  updateCellHoverLocation = _this$props5.updateCellHoverLocation;
102
106
  var rowHeights = getRowHeights(tableRef);
107
+ if (isSSR() && expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
108
+ return /*#__PURE__*/React.createElement("div", {
109
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
110
+ className: ClassName.NUMBERED_COLUMN,
111
+ style: {
112
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
113
+ marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
114
+ borderLeft:
115
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
116
+ isDragAndDropEnabled && tableActive ? "1px solid ".concat(tableBorderColor) : undefined,
117
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
118
+ visibility: 'hidden' // Ensure the column is not visible during SSR
119
+ },
120
+ contentEditable: false
121
+ });
122
+ }
103
123
  return /*#__PURE__*/React.createElement("div", {
104
124
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
105
125
  className: ClassName.NUMBERED_COLUMN,
106
- style: {
126
+ style: _objectSpread({
107
127
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
108
128
  marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
109
129
  borderLeft:
110
130
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
111
131
  isDragAndDropEnabled && tableActive ? "1px solid ".concat(tableBorderColor) : undefined
112
- },
132
+ }, expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? {
133
+ visibility: 'visible'
134
+ } : {}),
113
135
  contentEditable: false
114
136
  }, rowHeights.map(function (rowHeight, index) {
115
137
  return isDragAndDropEnabled ?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "12.2.5",
3
+ "version": "12.2.7",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/editor-plugin-guideline": "^3.0.0",
42
42
  "@atlaskit/editor-plugin-interaction": "^5.0.0",
43
43
  "@atlaskit/editor-plugin-limited-mode": "^0.0.3",
44
- "@atlaskit/editor-plugin-selection": "^3.1.0",
44
+ "@atlaskit/editor-plugin-selection": "^3.2.0",
45
45
  "@atlaskit/editor-plugin-user-intent": "^1.1.0",
46
46
  "@atlaskit/editor-plugin-width": "^4.0.0",
47
47
  "@atlaskit/editor-prosemirror": "7.0.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/primitives": "^14.11.0",
58
58
  "@atlaskit/react-ufo": "^4.4.0",
59
59
  "@atlaskit/theme": "^19.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
60
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
61
61
  "@atlaskit/toggle": "^15.1.0",
62
62
  "@atlaskit/tokens": "^6.0.0",
63
63
  "@atlaskit/tooltip": "^20.4.0",
@@ -70,7 +70,7 @@
70
70
  "uuid": "^3.1.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@atlaskit/editor-common": "^107.26.0",
73
+ "@atlaskit/editor-common": "^107.28.0",
74
74
  "react": "^18.2.0",
75
75
  "react-dom": "^18.2.0",
76
76
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -1,123 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.confluence.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "composite": true,
7
- "outDir": "../../../../../confluence/tsDist/@atlaskit__editor-plugin-table",
8
- "rootDir": "../"
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../design-system/button/afm-cc/tsconfig.json"
28
- },
29
- {
30
- "path": "../../custom-steps/afm-cc/tsconfig.json"
31
- },
32
- {
33
- "path": "../../editor-palette/afm-cc/tsconfig.json"
34
- },
35
- {
36
- "path": "../../editor-plugin-accessibility-utils/afm-cc/tsconfig.json"
37
- },
38
- {
39
- "path": "../../editor-plugin-analytics/afm-cc/tsconfig.json"
40
- },
41
- {
42
- "path": "../../editor-plugin-batch-attribute-updates/afm-cc/tsconfig.json"
43
- },
44
- {
45
- "path": "../../editor-plugin-content-insertion/afm-cc/tsconfig.json"
46
- },
47
- {
48
- "path": "../../editor-plugin-editor-viewmode/afm-cc/tsconfig.json"
49
- },
50
- {
51
- "path": "../../editor-plugin-extension/afm-cc/tsconfig.json"
52
- },
53
- {
54
- "path": "../../editor-plugin-guideline/afm-cc/tsconfig.json"
55
- },
56
- {
57
- "path": "../../editor-plugin-interaction/afm-cc/tsconfig.json"
58
- },
59
- {
60
- "path": "../../editor-plugin-limited-mode/afm-cc/tsconfig.json"
61
- },
62
- {
63
- "path": "../../editor-plugin-selection/afm-cc/tsconfig.json"
64
- },
65
- {
66
- "path": "../../editor-plugin-user-intent/afm-cc/tsconfig.json"
67
- },
68
- {
69
- "path": "../../editor-plugin-width/afm-cc/tsconfig.json"
70
- },
71
- {
72
- "path": "../../editor-shared-styles/afm-cc/tsconfig.json"
73
- },
74
- {
75
- "path": "../../editor-tables/afm-cc/tsconfig.json"
76
- },
77
- {
78
- "path": "../../../design-system/icon/afm-cc/tsconfig.json"
79
- },
80
- {
81
- "path": "../../../design-system/menu/afm-cc/tsconfig.json"
82
- },
83
- {
84
- "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
85
- },
86
- {
87
- "path": "../../../platform/feature-flags-react/afm-cc/tsconfig.json"
88
- },
89
- {
90
- "path": "../../../pragmatic-drag-and-drop/core/afm-cc/tsconfig.json"
91
- },
92
- {
93
- "path": "../../../pragmatic-drag-and-drop/auto-scroll/afm-cc/tsconfig.json"
94
- },
95
- {
96
- "path": "../../../pragmatic-drag-and-drop/hitbox/afm-cc/tsconfig.json"
97
- },
98
- {
99
- "path": "../../../design-system/primitives/afm-cc/tsconfig.json"
100
- },
101
- {
102
- "path": "../../../react-ufo/atlaskit/afm-cc/tsconfig.json"
103
- },
104
- {
105
- "path": "../../../design-system/theme/afm-cc/tsconfig.json"
106
- },
107
- {
108
- "path": "../../tmp-editor-statsig/afm-cc/tsconfig.json"
109
- },
110
- {
111
- "path": "../../../design-system/toggle/afm-cc/tsconfig.json"
112
- },
113
- {
114
- "path": "../../../design-system/tokens/afm-cc/tsconfig.json"
115
- },
116
- {
117
- "path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
118
- },
119
- {
120
- "path": "../../editor-common/afm-cc/tsconfig.json"
121
- }
122
- ]
123
- }
@@ -1,123 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.dev-agents.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../dev-agents/tsDist/@atlaskit__editor-plugin-table/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../design-system/button/afm-dev-agents/tsconfig.json"
28
- },
29
- {
30
- "path": "../../custom-steps/afm-dev-agents/tsconfig.json"
31
- },
32
- {
33
- "path": "../../editor-palette/afm-dev-agents/tsconfig.json"
34
- },
35
- {
36
- "path": "../../editor-plugin-accessibility-utils/afm-dev-agents/tsconfig.json"
37
- },
38
- {
39
- "path": "../../editor-plugin-analytics/afm-dev-agents/tsconfig.json"
40
- },
41
- {
42
- "path": "../../editor-plugin-batch-attribute-updates/afm-dev-agents/tsconfig.json"
43
- },
44
- {
45
- "path": "../../editor-plugin-content-insertion/afm-dev-agents/tsconfig.json"
46
- },
47
- {
48
- "path": "../../editor-plugin-editor-viewmode/afm-dev-agents/tsconfig.json"
49
- },
50
- {
51
- "path": "../../editor-plugin-extension/afm-dev-agents/tsconfig.json"
52
- },
53
- {
54
- "path": "../../editor-plugin-guideline/afm-dev-agents/tsconfig.json"
55
- },
56
- {
57
- "path": "../../editor-plugin-interaction/afm-dev-agents/tsconfig.json"
58
- },
59
- {
60
- "path": "../../editor-plugin-limited-mode/afm-dev-agents/tsconfig.json"
61
- },
62
- {
63
- "path": "../../editor-plugin-selection/afm-dev-agents/tsconfig.json"
64
- },
65
- {
66
- "path": "../../editor-plugin-user-intent/afm-dev-agents/tsconfig.json"
67
- },
68
- {
69
- "path": "../../editor-plugin-width/afm-dev-agents/tsconfig.json"
70
- },
71
- {
72
- "path": "../../editor-shared-styles/afm-dev-agents/tsconfig.json"
73
- },
74
- {
75
- "path": "../../editor-tables/afm-dev-agents/tsconfig.json"
76
- },
77
- {
78
- "path": "../../../design-system/icon/afm-dev-agents/tsconfig.json"
79
- },
80
- {
81
- "path": "../../../design-system/menu/afm-dev-agents/tsconfig.json"
82
- },
83
- {
84
- "path": "../../../platform/feature-flags/afm-dev-agents/tsconfig.json"
85
- },
86
- {
87
- "path": "../../../platform/feature-flags-react/afm-dev-agents/tsconfig.json"
88
- },
89
- {
90
- "path": "../../../pragmatic-drag-and-drop/core/afm-dev-agents/tsconfig.json"
91
- },
92
- {
93
- "path": "../../../pragmatic-drag-and-drop/auto-scroll/afm-dev-agents/tsconfig.json"
94
- },
95
- {
96
- "path": "../../../pragmatic-drag-and-drop/hitbox/afm-dev-agents/tsconfig.json"
97
- },
98
- {
99
- "path": "../../../design-system/primitives/afm-dev-agents/tsconfig.json"
100
- },
101
- {
102
- "path": "../../../react-ufo/atlaskit/afm-dev-agents/tsconfig.json"
103
- },
104
- {
105
- "path": "../../../design-system/theme/afm-dev-agents/tsconfig.json"
106
- },
107
- {
108
- "path": "../../tmp-editor-statsig/afm-dev-agents/tsconfig.json"
109
- },
110
- {
111
- "path": "../../../design-system/toggle/afm-dev-agents/tsconfig.json"
112
- },
113
- {
114
- "path": "../../../design-system/tokens/afm-dev-agents/tsconfig.json"
115
- },
116
- {
117
- "path": "../../../design-system/tooltip/afm-dev-agents/tsconfig.json"
118
- },
119
- {
120
- "path": "../../editor-common/afm-dev-agents/tsconfig.json"
121
- }
122
- ]
123
- }
@@ -1,123 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__editor-plugin-table/app",
7
- "rootDir": "../",
8
- "composite": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../design-system/button/afm-jira/tsconfig.json"
28
- },
29
- {
30
- "path": "../../custom-steps/afm-jira/tsconfig.json"
31
- },
32
- {
33
- "path": "../../editor-palette/afm-jira/tsconfig.json"
34
- },
35
- {
36
- "path": "../../editor-plugin-accessibility-utils/afm-jira/tsconfig.json"
37
- },
38
- {
39
- "path": "../../editor-plugin-analytics/afm-jira/tsconfig.json"
40
- },
41
- {
42
- "path": "../../editor-plugin-batch-attribute-updates/afm-jira/tsconfig.json"
43
- },
44
- {
45
- "path": "../../editor-plugin-content-insertion/afm-jira/tsconfig.json"
46
- },
47
- {
48
- "path": "../../editor-plugin-editor-viewmode/afm-jira/tsconfig.json"
49
- },
50
- {
51
- "path": "../../editor-plugin-extension/afm-jira/tsconfig.json"
52
- },
53
- {
54
- "path": "../../editor-plugin-guideline/afm-jira/tsconfig.json"
55
- },
56
- {
57
- "path": "../../editor-plugin-interaction/afm-jira/tsconfig.json"
58
- },
59
- {
60
- "path": "../../editor-plugin-limited-mode/afm-jira/tsconfig.json"
61
- },
62
- {
63
- "path": "../../editor-plugin-selection/afm-jira/tsconfig.json"
64
- },
65
- {
66
- "path": "../../editor-plugin-user-intent/afm-jira/tsconfig.json"
67
- },
68
- {
69
- "path": "../../editor-plugin-width/afm-jira/tsconfig.json"
70
- },
71
- {
72
- "path": "../../editor-shared-styles/afm-jira/tsconfig.json"
73
- },
74
- {
75
- "path": "../../editor-tables/afm-jira/tsconfig.json"
76
- },
77
- {
78
- "path": "../../../design-system/icon/afm-jira/tsconfig.json"
79
- },
80
- {
81
- "path": "../../../design-system/menu/afm-jira/tsconfig.json"
82
- },
83
- {
84
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
85
- },
86
- {
87
- "path": "../../../platform/feature-flags-react/afm-jira/tsconfig.json"
88
- },
89
- {
90
- "path": "../../../pragmatic-drag-and-drop/core/afm-jira/tsconfig.json"
91
- },
92
- {
93
- "path": "../../../pragmatic-drag-and-drop/auto-scroll/afm-jira/tsconfig.json"
94
- },
95
- {
96
- "path": "../../../pragmatic-drag-and-drop/hitbox/afm-jira/tsconfig.json"
97
- },
98
- {
99
- "path": "../../../design-system/primitives/afm-jira/tsconfig.json"
100
- },
101
- {
102
- "path": "../../../react-ufo/atlaskit/afm-jira/tsconfig.json"
103
- },
104
- {
105
- "path": "../../../design-system/theme/afm-jira/tsconfig.json"
106
- },
107
- {
108
- "path": "../../tmp-editor-statsig/afm-jira/tsconfig.json"
109
- },
110
- {
111
- "path": "../../../design-system/toggle/afm-jira/tsconfig.json"
112
- },
113
- {
114
- "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
115
- },
116
- {
117
- "path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
118
- },
119
- {
120
- "path": "../../editor-common/afm-jira/tsconfig.json"
121
- }
122
- ]
123
- }