@atlaskit/editor-plugin-table 16.3.2 → 16.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 16.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`275fdae298e95`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/275fdae298e95) -
8
+ [ux] EDITOR-4412 Show/hide header column/row and numbered column toggles in drag controls based on
9
+ editor props
10
+ - Updated dependencies
11
+
12
+ ## 16.3.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [`e225fb5074e28`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e225fb5074e28) -
17
+ [ux] Update logic for enabling drag and drop in tables
18
+ - Updated dependencies
19
+
3
20
  ## 16.3.2
4
21
 
5
22
  ### Patch Changes
@@ -67,7 +67,7 @@ var TABLE_WIDTH_INFO_TIMEOUT = 10000;
67
67
  * from `@atlaskit/editor-core`.
68
68
  */
69
69
  var tablePlugin = function tablePlugin(_ref) {
70
- var _config$tableOptions, _fg, _api$analytics, _options$getEditorFea, _options$getEditorFea2;
70
+ var _config$tableOptions, _api$analytics, _options$getEditorFea, _options$getEditorFea2;
71
71
  var config = _ref.config,
72
72
  api = _ref.api;
73
73
  var editorViewRef = {
@@ -75,7 +75,7 @@ var tablePlugin = function tablePlugin(_ref) {
75
75
  };
76
76
  var options = _objectSpread(_objectSpread({}, config), {}, {
77
77
  tableOptions: (_config$tableOptions = config === null || config === void 0 ? void 0 : config.tableOptions) !== null && _config$tableOptions !== void 0 ? _config$tableOptions : {},
78
- dragAndDropEnabled: (_fg = (0, _platformFeatureFlags.fg)('platform_editor_enable_table_dnd')) !== null && _fg !== void 0 ? _fg : config === null || config === void 0 ? void 0 : config.dragAndDropEnabled
78
+ dragAndDropEnabled: (config === null || config === void 0 ? void 0 : config.dragAndDropEnabled) || (0, _platformFeatureFlags.fg)('platform_editor_enable_table_dnd')
79
79
  });
80
80
  var defaultGetEditorContainerWidth = function defaultGetEditorContainerWidth() {
81
81
  var _api$width$sharedStat, _api$width, _document$body$offset, _document;
@@ -23,6 +23,7 @@ var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
23
23
  var _tableMap = require("@atlaskit/editor-tables/table-map");
24
24
  var _utils2 = require("@atlaskit/editor-tables/utils");
25
25
  var _paintBucket = _interopRequireDefault(require("@atlaskit/icon/core/paint-bucket"));
26
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
27
  var _primitives = require("@atlaskit/primitives");
27
28
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
28
29
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
@@ -358,14 +359,8 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
358
359
  var toggleRowNumbers = function toggleRowNumbers() {
359
360
  (0, _commandsWithAnalytics.toggleNumberColumnWithAnalytics)(editorAnalyticsAPI)(state, dispatch);
360
361
  };
361
- var createHeaderRowColumnMenuItem = function createHeaderRowColumnMenuItem(direction) {
362
- return direction === 'column' ? {
363
- key: 'header_column',
364
- content: formatMessage(_messages.tableMessages.headerColumn),
365
- value: {
366
- name: 'header_column'
367
- },
368
- elemAfter:
362
+ var HeaderColumnToggle = function HeaderColumnToggle() {
363
+ return (
369
364
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
370
365
  (0, _react2.jsx)("div", {
371
366
  css: _styles2.toggleStyles
@@ -375,13 +370,10 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
375
370
  onChange: toggleHeaderColumn,
376
371
  isChecked: (0, _nodes.checkIfHeaderColumnEnabled)(selection)
377
372
  }))
378
- } : {
379
- key: 'header_row',
380
- content: formatMessage(_messages.tableMessages.headerRow),
381
- value: {
382
- name: 'header_row'
383
- },
384
- elemAfter:
373
+ );
374
+ };
375
+ var HeaderRowToggle = function HeaderRowToggle() {
376
+ return (
385
377
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
386
378
  (0, _react2.jsx)("div", {
387
379
  css: _styles2.toggleStyles
@@ -391,8 +383,47 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
391
383
  onChange: toggleHeaderRow,
392
384
  isChecked: (0, _nodes.checkIfHeaderRowEnabled)(selection)
393
385
  }))
386
+ );
387
+ };
388
+ var createHeaderRowColumnMenuItemOld = function createHeaderRowColumnMenuItemOld(direction) {
389
+ return direction === 'column' ? {
390
+ key: 'header_column',
391
+ content: formatMessage(_messages.tableMessages.headerColumn),
392
+ value: {
393
+ name: 'header_column'
394
+ },
395
+ elemAfter: (0, _react2.jsx)(HeaderColumnToggle, null)
396
+ } : {
397
+ key: 'header_row',
398
+ content: formatMessage(_messages.tableMessages.headerRow),
399
+ value: {
400
+ name: 'header_row'
401
+ },
402
+ elemAfter: (0, _react2.jsx)(HeaderRowToggle, null)
394
403
  };
395
404
  };
405
+ var createHeaderRowColumnMenuItem = function createHeaderRowColumnMenuItem(direction) {
406
+ if (direction === 'column' && (pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderColumn)) {
407
+ return {
408
+ key: 'header_column',
409
+ content: formatMessage(_messages.tableMessages.headerColumn),
410
+ value: {
411
+ name: 'header_column'
412
+ },
413
+ elemAfter: (0, _react2.jsx)(HeaderColumnToggle, null)
414
+ };
415
+ }
416
+ if (direction === 'row' && (pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderRow)) {
417
+ return {
418
+ key: 'header_row',
419
+ content: formatMessage(_messages.tableMessages.headerRow),
420
+ value: {
421
+ name: 'header_row'
422
+ },
423
+ elemAfter: (0, _react2.jsx)(HeaderRowToggle, null)
424
+ };
425
+ }
426
+ };
396
427
  var createRowNumbersMenuItem = function createRowNumbersMenuItem() {
397
428
  return {
398
429
  key: 'row_numbers',
@@ -518,13 +549,20 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
518
549
  // If first row, add toggle for Header row, default is true
519
550
  // If first column, add toggle for Header column, default is false
520
551
  if (index === 0) {
521
- menuItems.push({
522
- items: [createHeaderRowColumnMenuItem(direction)]
523
- });
552
+ if (!(0, _platformFeatureFlags.fg)('platform_editor_enable_table_dnd')) {
553
+ menuItems.push({
554
+ items: [createHeaderRowColumnMenuItemOld(direction)]
555
+ });
556
+ } else if ((pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderColumn || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderRow) && (0, _platformFeatureFlags.fg)('platform_editor_enable_table_dnd')) {
557
+ var headerRowColumnMenuItem = createHeaderRowColumnMenuItem(direction);
558
+ headerRowColumnMenuItem && menuItems.push({
559
+ items: [headerRowColumnMenuItem]
560
+ });
561
+ }
524
562
  }
525
563
 
526
564
  // All rows, add toggle for numbered rows, default is false
527
- if (direction === 'row') {
565
+ if (direction === 'row' && ((0, _platformFeatureFlags.fg)('platform_editor_enable_table_dnd') ? (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.advanced) || (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowNumberColumn) : true)) {
528
566
  index === 0 ? menuItems[menuItems.length - 1].items.push(createRowNumbersMenuItem()) : menuItems.push({
529
567
  items: [createRowNumbersMenuItem()]
530
568
  });
@@ -56,14 +56,14 @@ const tablePlugin = ({
56
56
  config,
57
57
  api
58
58
  }) => {
59
- var _config$tableOptions, _fg, _api$analytics, _options$getEditorFea, _options$getEditorFea2;
59
+ var _config$tableOptions, _api$analytics, _options$getEditorFea, _options$getEditorFea2;
60
60
  const editorViewRef = {
61
61
  current: null
62
62
  };
63
63
  const options = {
64
64
  ...config,
65
65
  tableOptions: (_config$tableOptions = config === null || config === void 0 ? void 0 : config.tableOptions) !== null && _config$tableOptions !== void 0 ? _config$tableOptions : {},
66
- dragAndDropEnabled: (_fg = fg('platform_editor_enable_table_dnd')) !== null && _fg !== void 0 ? _fg : config === null || config === void 0 ? void 0 : config.dragAndDropEnabled
66
+ dragAndDropEnabled: (config === null || config === void 0 ? void 0 : config.dragAndDropEnabled) || fg('platform_editor_enable_table_dnd')
67
67
  };
68
68
  const defaultGetEditorContainerWidth = () => {
69
69
  var _api$width$sharedStat, _api$width, _document$body$offset, _document, _document$body;
@@ -21,6 +21,7 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
21
21
  import { TableMap } from '@atlaskit/editor-tables/table-map';
22
22
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
23
23
  import PaintBucketIcon from '@atlaskit/icon/core/paint-bucket';
24
+ import { fg } from '@atlaskit/platform-feature-flags';
24
25
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
25
26
  import { Box, xcss } from '@atlaskit/primitives';
26
27
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -352,41 +353,65 @@ const DragMenu = /*#__PURE__*/React.memo(({
352
353
  const toggleRowNumbers = () => {
353
354
  toggleNumberColumnWithAnalytics(editorAnalyticsAPI)(state, dispatch);
354
355
  };
355
- const createHeaderRowColumnMenuItem = direction => {
356
+ const HeaderColumnToggle = () =>
357
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
358
+ jsx("div", {
359
+ css: toggleStyles
360
+ }, jsx(Toggle, {
361
+ id: "toggle-header-column",
362
+ label: formatMessage(messages.headerColumn),
363
+ onChange: toggleHeaderColumn,
364
+ isChecked: checkIfHeaderColumnEnabled(selection)
365
+ }));
366
+ const HeaderRowToggle = () =>
367
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
368
+ jsx("div", {
369
+ css: toggleStyles
370
+ }, jsx(Toggle, {
371
+ id: "toggle-header-row",
372
+ label: formatMessage(messages.headerRow),
373
+ onChange: toggleHeaderRow,
374
+ isChecked: checkIfHeaderRowEnabled(selection)
375
+ }));
376
+ const createHeaderRowColumnMenuItemOld = direction => {
356
377
  return direction === 'column' ? {
357
378
  key: 'header_column',
358
379
  content: formatMessage(messages.headerColumn),
359
380
  value: {
360
381
  name: 'header_column'
361
382
  },
362
- elemAfter:
363
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
364
- jsx("div", {
365
- css: toggleStyles
366
- }, jsx(Toggle, {
367
- id: "toggle-header-column",
368
- label: formatMessage(messages.headerColumn),
369
- onChange: toggleHeaderColumn,
370
- isChecked: checkIfHeaderColumnEnabled(selection)
371
- }))
383
+ elemAfter: jsx(HeaderColumnToggle, null)
372
384
  } : {
373
385
  key: 'header_row',
374
386
  content: formatMessage(messages.headerRow),
375
387
  value: {
376
388
  name: 'header_row'
377
389
  },
378
- elemAfter:
379
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
380
- jsx("div", {
381
- css: toggleStyles
382
- }, jsx(Toggle, {
383
- id: "toggle-header-row",
384
- label: formatMessage(messages.headerRow),
385
- onChange: toggleHeaderRow,
386
- isChecked: checkIfHeaderRowEnabled(selection)
387
- }))
390
+ elemAfter: jsx(HeaderRowToggle, null)
388
391
  };
389
392
  };
393
+ const createHeaderRowColumnMenuItem = direction => {
394
+ if (direction === 'column' && (pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderColumn)) {
395
+ return {
396
+ key: 'header_column',
397
+ content: formatMessage(messages.headerColumn),
398
+ value: {
399
+ name: 'header_column'
400
+ },
401
+ elemAfter: jsx(HeaderColumnToggle, null)
402
+ };
403
+ }
404
+ if (direction === 'row' && (pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderRow)) {
405
+ return {
406
+ key: 'header_row',
407
+ content: formatMessage(messages.headerRow),
408
+ value: {
409
+ name: 'header_row'
410
+ },
411
+ elemAfter: jsx(HeaderRowToggle, null)
412
+ };
413
+ }
414
+ };
390
415
  const createRowNumbersMenuItem = () => {
391
416
  return {
392
417
  key: 'row_numbers',
@@ -517,13 +542,20 @@ const DragMenu = /*#__PURE__*/React.memo(({
517
542
  // If first row, add toggle for Header row, default is true
518
543
  // If first column, add toggle for Header column, default is false
519
544
  if (index === 0) {
520
- menuItems.push({
521
- items: [createHeaderRowColumnMenuItem(direction)]
522
- });
545
+ if (!fg('platform_editor_enable_table_dnd')) {
546
+ menuItems.push({
547
+ items: [createHeaderRowColumnMenuItemOld(direction)]
548
+ });
549
+ } else if ((pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderColumn || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderRow) && fg('platform_editor_enable_table_dnd')) {
550
+ const headerRowColumnMenuItem = createHeaderRowColumnMenuItem(direction);
551
+ headerRowColumnMenuItem && menuItems.push({
552
+ items: [headerRowColumnMenuItem]
553
+ });
554
+ }
523
555
  }
524
556
 
525
557
  // All rows, add toggle for numbered rows, default is false
526
- if (direction === 'row') {
558
+ if (direction === 'row' && (fg('platform_editor_enable_table_dnd') ? (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.advanced) || (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowNumberColumn) : true)) {
527
559
  index === 0 ? menuItems[menuItems.length - 1].items.push(createRowNumbersMenuItem()) : menuItems.push({
528
560
  items: [createRowNumbersMenuItem()]
529
561
  });
@@ -58,7 +58,7 @@ var TABLE_WIDTH_INFO_TIMEOUT = 10000;
58
58
  * from `@atlaskit/editor-core`.
59
59
  */
60
60
  var tablePlugin = function tablePlugin(_ref) {
61
- var _config$tableOptions, _fg, _api$analytics, _options$getEditorFea, _options$getEditorFea2;
61
+ var _config$tableOptions, _api$analytics, _options$getEditorFea, _options$getEditorFea2;
62
62
  var config = _ref.config,
63
63
  api = _ref.api;
64
64
  var editorViewRef = {
@@ -66,7 +66,7 @@ var tablePlugin = function tablePlugin(_ref) {
66
66
  };
67
67
  var options = _objectSpread(_objectSpread({}, config), {}, {
68
68
  tableOptions: (_config$tableOptions = config === null || config === void 0 ? void 0 : config.tableOptions) !== null && _config$tableOptions !== void 0 ? _config$tableOptions : {},
69
- dragAndDropEnabled: (_fg = fg('platform_editor_enable_table_dnd')) !== null && _fg !== void 0 ? _fg : config === null || config === void 0 ? void 0 : config.dragAndDropEnabled
69
+ dragAndDropEnabled: (config === null || config === void 0 ? void 0 : config.dragAndDropEnabled) || fg('platform_editor_enable_table_dnd')
70
70
  });
71
71
  var defaultGetEditorContainerWidth = function defaultGetEditorContainerWidth() {
72
72
  var _api$width$sharedStat, _api$width, _document$body$offset, _document;
@@ -23,6 +23,7 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
23
23
  import { TableMap } from '@atlaskit/editor-tables/table-map';
24
24
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
25
25
  import PaintBucketIcon from '@atlaskit/icon/core/paint-bucket';
26
+ import { fg } from '@atlaskit/platform-feature-flags';
26
27
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
27
28
  import { Box, xcss } from '@atlaskit/primitives';
28
29
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -347,14 +348,8 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
347
348
  var toggleRowNumbers = function toggleRowNumbers() {
348
349
  toggleNumberColumnWithAnalytics(editorAnalyticsAPI)(state, dispatch);
349
350
  };
350
- var createHeaderRowColumnMenuItem = function createHeaderRowColumnMenuItem(direction) {
351
- return direction === 'column' ? {
352
- key: 'header_column',
353
- content: formatMessage(messages.headerColumn),
354
- value: {
355
- name: 'header_column'
356
- },
357
- elemAfter:
351
+ var HeaderColumnToggle = function HeaderColumnToggle() {
352
+ return (
358
353
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
359
354
  jsx("div", {
360
355
  css: toggleStyles
@@ -364,13 +359,10 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
364
359
  onChange: toggleHeaderColumn,
365
360
  isChecked: checkIfHeaderColumnEnabled(selection)
366
361
  }))
367
- } : {
368
- key: 'header_row',
369
- content: formatMessage(messages.headerRow),
370
- value: {
371
- name: 'header_row'
372
- },
373
- elemAfter:
362
+ );
363
+ };
364
+ var HeaderRowToggle = function HeaderRowToggle() {
365
+ return (
374
366
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
375
367
  jsx("div", {
376
368
  css: toggleStyles
@@ -380,8 +372,47 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
380
372
  onChange: toggleHeaderRow,
381
373
  isChecked: checkIfHeaderRowEnabled(selection)
382
374
  }))
375
+ );
376
+ };
377
+ var createHeaderRowColumnMenuItemOld = function createHeaderRowColumnMenuItemOld(direction) {
378
+ return direction === 'column' ? {
379
+ key: 'header_column',
380
+ content: formatMessage(messages.headerColumn),
381
+ value: {
382
+ name: 'header_column'
383
+ },
384
+ elemAfter: jsx(HeaderColumnToggle, null)
385
+ } : {
386
+ key: 'header_row',
387
+ content: formatMessage(messages.headerRow),
388
+ value: {
389
+ name: 'header_row'
390
+ },
391
+ elemAfter: jsx(HeaderRowToggle, null)
383
392
  };
384
393
  };
394
+ var createHeaderRowColumnMenuItem = function createHeaderRowColumnMenuItem(direction) {
395
+ if (direction === 'column' && (pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderColumn)) {
396
+ return {
397
+ key: 'header_column',
398
+ content: formatMessage(messages.headerColumn),
399
+ value: {
400
+ name: 'header_column'
401
+ },
402
+ elemAfter: jsx(HeaderColumnToggle, null)
403
+ };
404
+ }
405
+ if (direction === 'row' && (pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderRow)) {
406
+ return {
407
+ key: 'header_row',
408
+ content: formatMessage(messages.headerRow),
409
+ value: {
410
+ name: 'header_row'
411
+ },
412
+ elemAfter: jsx(HeaderRowToggle, null)
413
+ };
414
+ }
415
+ };
385
416
  var createRowNumbersMenuItem = function createRowNumbersMenuItem() {
386
417
  return {
387
418
  key: 'row_numbers',
@@ -507,13 +538,20 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
507
538
  // If first row, add toggle for Header row, default is true
508
539
  // If first column, add toggle for Header column, default is false
509
540
  if (index === 0) {
510
- menuItems.push({
511
- items: [createHeaderRowColumnMenuItem(direction)]
512
- });
541
+ if (!fg('platform_editor_enable_table_dnd')) {
542
+ menuItems.push({
543
+ items: [createHeaderRowColumnMenuItemOld(direction)]
544
+ });
545
+ } else if ((pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.advanced || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderColumn || pluginConfig !== null && pluginConfig !== void 0 && pluginConfig.allowHeaderRow) && fg('platform_editor_enable_table_dnd')) {
546
+ var headerRowColumnMenuItem = createHeaderRowColumnMenuItem(direction);
547
+ headerRowColumnMenuItem && menuItems.push({
548
+ items: [headerRowColumnMenuItem]
549
+ });
550
+ }
513
551
  }
514
552
 
515
553
  // All rows, add toggle for numbered rows, default is false
516
- if (direction === 'row') {
554
+ if (direction === 'row' && (fg('platform_editor_enable_table_dnd') ? (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.advanced) || (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowNumberColumn) : true)) {
517
555
  index === 0 ? menuItems[menuItems.length - 1].items.push(createRowNumbersMenuItem()) : menuItems.push({
518
556
  items: [createRowNumbersMenuItem()]
519
557
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "16.3.2",
3
+ "version": "16.3.4",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/editor-plugin-batch-attribute-updates": "^7.0.0",
38
38
  "@atlaskit/editor-plugin-content-insertion": "^7.0.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
40
- "@atlaskit/editor-plugin-extension": "10.0.2",
40
+ "@atlaskit/editor-plugin-extension": "10.0.3",
41
41
  "@atlaskit/editor-plugin-guideline": "^7.0.0",
42
42
  "@atlaskit/editor-plugin-interaction": "^13.0.0",
43
43
  "@atlaskit/editor-plugin-limited-mode": "^4.0.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
58
58
  "@atlaskit/primitives": "^17.1.0",
59
59
  "@atlaskit/theme": "^21.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^16.23.0",
60
+ "@atlaskit/tmp-editor-statsig": "^16.25.0",
61
61
  "@atlaskit/toggle": "^15.2.0",
62
62
  "@atlaskit/tokens": "^10.0.0",
63
63
  "@atlaskit/tooltip": "^20.14.0",