@atlaskit/editor-plugin-table 13.0.7 → 13.0.8

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,13 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 13.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a8630c1107c3d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a8630c1107c3d) -
8
+ [ED-28781] Hide inline text toolbar when other popups are open
9
+ - Updated dependencies
10
+
3
11
  ## 13.0.7
4
12
 
5
13
  ### Patch Changes
@@ -26,6 +26,7 @@ var _utils = require("@atlaskit/editor-tables/utils");
26
26
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
27
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
28
28
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
29
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
29
30
  var _commandsWithAnalytics = require("../pm-plugins/commands/commands-with-analytics");
30
31
  var _misc = require("../pm-plugins/commands/misc");
31
32
  var _tableAnalytics = require("../pm-plugins/table-analytics");
@@ -258,7 +259,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
258
259
  tr.setMeta(_tableAnalytics.META_KEYS.OVERFLOW_TRIGGER, {
259
260
  name: _analytics.TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED
260
261
  });
261
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
262
+ if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) || (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true)) {
262
263
  var _pluginInjectionApi$u;
263
264
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u === void 0 || _pluginInjectionApi$u.commands.setCurrentUserIntent('resizing')({
264
265
  tr: tr
@@ -335,7 +336,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
335
336
  tableRef: null
336
337
  });
337
338
  tr.setMeta('is-resizer-resizing', false);
338
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
339
+ if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) || (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true)) {
339
340
  var _pluginInjectionApi$u2;
340
341
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u2 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u2 === void 0 || _pluginInjectionApi$u2.commands.setCurrentUserIntent('default')({
341
342
  tr: tr
@@ -16,6 +16,7 @@ var _messages = require("@atlaskit/editor-common/messages");
16
16
  var _styles = require("@atlaskit/editor-common/styles");
17
17
  var _uiColor = require("@atlaskit/editor-common/ui-color");
18
18
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
19
+ var _userIntent = require("@atlaskit/editor-common/user-intent");
19
20
  var _utils = require("@atlaskit/editor-common/utils");
20
21
  var _editorPalette = require("@atlaskit/editor-palette");
21
22
  var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
@@ -24,6 +25,7 @@ var _utils2 = require("@atlaskit/editor-tables/utils");
24
25
  var _paintBucketEditorBackgroundColor = _interopRequireDefault(require("@atlaskit/icon/core/migration/paint-bucket--editor-background-color"));
25
26
  var _primitives = require("@atlaskit/primitives");
26
27
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
28
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
27
29
  var _toggle = _interopRequireDefault(require("@atlaskit/toggle"));
28
30
  var _commands = require("../../pm-plugins/commands");
29
31
  var _commandsWithAnalytics = require("../../pm-plugins/commands/commands-with-analytics");
@@ -508,7 +510,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
508
510
  items: [createRowNumbersMenuItem()]
509
511
  });
510
512
  }
511
- return (0, _react2.jsx)(_DropdownMenu.DropdownMenu, {
513
+ var Menu = (0, _react2.jsx)(_DropdownMenu.DropdownMenu, {
512
514
  disableKeyboardHandling: isSubmenuOpen,
513
515
  section: {
514
516
  hasSeparator: true
@@ -524,5 +526,8 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
524
526
  boundariesElement: boundariesElement,
525
527
  scrollableElement: scrollableElement
526
528
  });
529
+ return (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? (0, _react2.jsx)(_userIntent.UserIntentPopupWrapper, {
530
+ api: api
531
+ }, Menu) : Menu;
527
532
  });
528
533
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(DragMenu);
@@ -16,6 +16,7 @@ import { findTable } from '@atlaskit/editor-tables/utils';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
18
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
19
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
19
20
  import { setTableAlignmentWithTableContentWithPosWithAnalytics } from '../pm-plugins/commands/commands-with-analytics';
20
21
  import { updateWidthToWidest } from '../pm-plugins/commands/misc';
21
22
  import { META_KEYS } from '../pm-plugins/table-analytics';
@@ -251,7 +252,7 @@ export const TableResizer = ({
251
252
  tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
252
253
  name: TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED
253
254
  });
254
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
255
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true)) {
255
256
  var _pluginInjectionApi$u;
256
257
  pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$u = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u === void 0 ? void 0 : _pluginInjectionApi$u.commands.setCurrentUserIntent('resizing')({
257
258
  tr
@@ -330,7 +331,7 @@ export const TableResizer = ({
330
331
  tableRef: null
331
332
  });
332
333
  tr.setMeta('is-resizer-resizing', false);
333
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
334
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true)) {
334
335
  var _pluginInjectionApi$u2;
335
336
  pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$u2 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u2 === void 0 ? void 0 : _pluginInjectionApi$u2.commands.setCurrentUserIntent('default')({
336
337
  tr
@@ -14,6 +14,7 @@ import { tableMessages as messages } from '@atlaskit/editor-common/messages';
14
14
  import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
15
15
  import { backgroundPaletteTooltipMessages, cellBackgroundColorPalette, ColorPalette, getSelectedRowAndColumnFromPalette } from '@atlaskit/editor-common/ui-color';
16
16
  import { ArrowKeyNavigationProvider, ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu';
17
+ import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
17
18
  import { closestElement } from '@atlaskit/editor-common/utils';
18
19
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
19
20
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
@@ -23,6 +24,7 @@ import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-
23
24
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
24
25
  import { Box, xcss } from '@atlaskit/primitives';
25
26
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
27
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
26
28
  import Toggle from '@atlaskit/toggle';
27
29
  import { clearHoverSelection, hoverColumns, hoverRows } from '../../pm-plugins/commands';
28
30
  import { setColorWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
@@ -507,7 +509,7 @@ const DragMenu = /*#__PURE__*/React.memo(({
507
509
  items: [createRowNumbersMenuItem()]
508
510
  });
509
511
  }
510
- return jsx(DropdownMenu, {
512
+ const Menu = jsx(DropdownMenu, {
511
513
  disableKeyboardHandling: isSubmenuOpen,
512
514
  section: {
513
515
  hasSeparator: true
@@ -523,5 +525,8 @@ const DragMenu = /*#__PURE__*/React.memo(({
523
525
  boundariesElement: boundariesElement,
524
526
  scrollableElement: scrollableElement
525
527
  });
528
+ return editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? jsx(UserIntentPopupWrapper, {
529
+ api: api
530
+ }, Menu) : Menu;
526
531
  });
527
532
  export default injectIntl(DragMenu);
@@ -20,6 +20,7 @@ import { findTable } from '@atlaskit/editor-tables/utils';
20
20
  import { fg } from '@atlaskit/platform-feature-flags';
21
21
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
22
22
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
23
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
23
24
  import { setTableAlignmentWithTableContentWithPosWithAnalytics } from '../pm-plugins/commands/commands-with-analytics';
24
25
  import { updateWidthToWidest } from '../pm-plugins/commands/misc';
25
26
  import { META_KEYS } from '../pm-plugins/table-analytics';
@@ -249,7 +250,7 @@ export var TableResizer = function TableResizer(_ref) {
249
250
  tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
250
251
  name: TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED
251
252
  });
252
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
253
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true)) {
253
254
  var _pluginInjectionApi$u;
254
255
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u === void 0 || _pluginInjectionApi$u.commands.setCurrentUserIntent('resizing')({
255
256
  tr: tr
@@ -326,7 +327,7 @@ export var TableResizer = function TableResizer(_ref) {
326
327
  tableRef: null
327
328
  });
328
329
  tr.setMeta('is-resizer-resizing', false);
329
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
330
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true)) {
330
331
  var _pluginInjectionApi$u2;
331
332
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u2 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u2 === void 0 || _pluginInjectionApi$u2.commands.setCurrentUserIntent('default')({
332
333
  tr: tr
@@ -16,6 +16,7 @@ import { tableMessages as messages } from '@atlaskit/editor-common/messages';
16
16
  import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
17
17
  import { backgroundPaletteTooltipMessages, cellBackgroundColorPalette, ColorPalette, getSelectedRowAndColumnFromPalette } from '@atlaskit/editor-common/ui-color';
18
18
  import { ArrowKeyNavigationProvider, ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu';
19
+ import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
19
20
  import { closestElement } from '@atlaskit/editor-common/utils';
20
21
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
21
22
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
@@ -25,6 +26,7 @@ import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-
25
26
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
26
27
  import { Box, xcss } from '@atlaskit/primitives';
27
28
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
29
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
28
30
  import Toggle from '@atlaskit/toggle';
29
31
  import { clearHoverSelection, hoverColumns, hoverRows } from '../../pm-plugins/commands';
30
32
  import { setColorWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
@@ -497,7 +499,7 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
497
499
  items: [createRowNumbersMenuItem()]
498
500
  });
499
501
  }
500
- return jsx(DropdownMenu, {
502
+ var Menu = jsx(DropdownMenu, {
501
503
  disableKeyboardHandling: isSubmenuOpen,
502
504
  section: {
503
505
  hasSeparator: true
@@ -513,5 +515,8 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
513
515
  boundariesElement: boundariesElement,
514
516
  scrollableElement: scrollableElement
515
517
  });
518
+ return editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? jsx(UserIntentPopupWrapper, {
519
+ api: api
520
+ }, Menu) : Menu;
516
521
  });
517
522
  export default injectIntl(DragMenu);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "13.0.7",
3
+ "version": "13.0.8",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -71,7 +71,7 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^108.3.0",
74
+ "@atlaskit/editor-common": "^108.5.0",
75
75
  "react": "^18.2.0",
76
76
  "react-dom": "^18.2.0",
77
77
  "react-intl-next": "npm:react-intl@^5.18.1"