@atlaskit/editor-plugin-block-controls 7.14.1 → 7.15.1

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,28 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 7.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`53aef9589ca55`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/53aef9589ca55) -
8
+ [EDITOR-3786] Make sure that for any check of `cc_editor_ai_content_mode` &&
9
+ `platform_editor_content_mode_button_mvp` in the code we are also checking
10
+ `confluence_compact_text_format`
11
+ - Updated dependencies
12
+
13
+ ## 7.15.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`762b79e21f96a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/762b79e21f96a) -
18
+ Migrated and cleaned up legacy iconography usage.
19
+
20
+ ### Patch Changes
21
+
22
+ - [`e4dce058a2b52`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e4dce058a2b52) -
23
+ EDITOR-3793 Stop preserving selection on block menu close
24
+ - Updated dependencies
25
+
3
26
  ## 7.14.1
4
27
 
5
28
  ### Patch Changes
@@ -102,6 +102,9 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
102
102
  tr: tr
103
103
  });
104
104
  }
105
+ (0, _editorCommands.stopPreservingSelection)({
106
+ tr: tr
107
+ });
105
108
  return tr;
106
109
  }
107
110
 
@@ -24,7 +24,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
24
24
  var _utils = require("@atlaskit/editor-prosemirror/utils");
25
25
  var _consts = require("@atlaskit/editor-shared-styles/consts");
26
26
  var _dragHandleVertical = _interopRequireDefault(require("@atlaskit/icon/core/drag-handle-vertical"));
27
- var _dragHandler = _interopRequireDefault(require("@atlaskit/icon/glyph/drag-handler"));
28
27
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
28
  var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
30
29
  var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
@@ -1024,7 +1023,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1024
1023
  css: [(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && dragHandleColor,
1025
1024
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
1026
1025
  // See https://product-fabric.atlassian.net/browse/ED-26266
1027
- browser.gecko && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && (0, _experiments.editorExperiment)('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && isFocused && keyboardFocusedDragHandleStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? focusedStyles : focusedStylesOld, (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') && dragHandleButtonDenseModeStyles],
1026
+ browser.gecko && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && (0, _experiments.editorExperiment)('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && isFocused && keyboardFocusedDragHandleStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? focusedStyles : focusedStylesOld, ((0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) && dragHandleButtonDenseModeStyles],
1028
1027
  ref: buttonRef
1029
1028
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1030
1029
  ,
@@ -1049,8 +1048,6 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1049
1048
  }, (0, _react2.jsx)(_dragHandleVertical.default, {
1050
1049
  spacing: "spacious",
1051
1050
  label: "",
1052
- LEGACY_fallbackIcon: _dragHandler.default,
1053
- LEGACY_size: "medium",
1054
1051
  size: "small"
1055
1052
  })))
1056
1053
  );
@@ -110,7 +110,6 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
110
110
  api = _ref.api,
111
111
  formatMessage = _ref.formatMessage,
112
112
  getPos = _ref.getPos,
113
- nodeType = _ref.nodeType,
114
113
  anchorName = _ref.anchorName,
115
114
  rootAnchorName = _ref.rootAnchorName,
116
115
  rootNodeType = _ref.rootNodeType,
@@ -291,7 +290,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
291
290
  testId: "editor-quick-insert-button",
292
291
  type: "button",
293
292
  "aria-label": formatMessage(_messages.blockControlsMessages.insert),
294
- xcss: [stickyButtonStyles, (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') && stickyButtonDenseModeStyles],
293
+ xcss: [stickyButtonStyles, ((0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) && stickyButtonDenseModeStyles],
295
294
  onClick: handleQuickInsert,
296
295
  onMouseDown: handleMouseDown
297
296
  }, (0, _react2.jsx)(_add.default, {
@@ -92,6 +92,9 @@ export const blockControlsPlugin = ({
92
92
  tr
93
93
  });
94
94
  }
95
+ stopPreservingSelection({
96
+ tr
97
+ });
95
98
  return tr;
96
99
  }
97
100
 
@@ -21,7 +21,6 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
21
21
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
22
22
  import { akEditorFullPageNarrowBreakout, akEditorTableToolbarSize, relativeSizeToBaseFontSize } from '@atlaskit/editor-shared-styles/consts';
23
23
  import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
24
- import DragHandlerIcon from '@atlaskit/icon/glyph/drag-handler';
25
24
  import { fg } from '@atlaskit/platform-feature-flags';
26
25
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
27
26
  import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
@@ -1011,7 +1010,7 @@ export const DragHandle = ({
1011
1010
  css: [editorExperiment('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
1012
1011
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
1013
1012
  // See https://product-fabric.atlassian.net/browse/ED-26266
1014
- browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorExperiment('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && isFocused && keyboardFocusedDragHandleStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? focusedStyles : focusedStylesOld, expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') && dragHandleButtonDenseModeStyles],
1013
+ browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorExperiment('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && isFocused && keyboardFocusedDragHandleStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? focusedStyles : focusedStylesOld, (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && dragHandleButtonDenseModeStyles],
1015
1014
  ref: buttonRef
1016
1015
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1017
1016
  ,
@@ -1034,8 +1033,6 @@ export const DragHandle = ({
1034
1033
  }, jsx(DragHandleVerticalIcon, {
1035
1034
  spacing: "spacious",
1036
1035
  label: "",
1037
- LEGACY_fallbackIcon: DragHandlerIcon,
1038
- LEGACY_size: "medium",
1039
1036
  size: "small"
1040
1037
  })));
1041
1038
  const stickyWithTooltip = () => jsx(Box
@@ -101,7 +101,6 @@ export const TypeAheadControl = ({
101
101
  api,
102
102
  formatMessage,
103
103
  getPos,
104
- nodeType,
105
104
  anchorName,
106
105
  rootAnchorName,
107
106
  rootNodeType,
@@ -286,7 +285,7 @@ export const TypeAheadControl = ({
286
285
  testId: "editor-quick-insert-button",
287
286
  type: "button",
288
287
  "aria-label": formatMessage(messages.insert),
289
- xcss: [stickyButtonStyles, expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') && stickyButtonDenseModeStyles],
288
+ xcss: [stickyButtonStyles, (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && stickyButtonDenseModeStyles],
290
289
  onClick: handleQuickInsert,
291
290
  onMouseDown: handleMouseDown
292
291
  }, jsx(AddIcon, {
@@ -95,6 +95,9 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
95
95
  tr: tr
96
96
  });
97
97
  }
98
+ _stopPreservingSelection({
99
+ tr: tr
100
+ });
98
101
  return tr;
99
102
  }
100
103
 
@@ -26,7 +26,6 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
26
26
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
27
27
  import { akEditorFullPageNarrowBreakout, akEditorTableToolbarSize, relativeSizeToBaseFontSize } from '@atlaskit/editor-shared-styles/consts';
28
28
  import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
29
- import DragHandlerIcon from '@atlaskit/icon/glyph/drag-handler';
30
29
  import { fg } from '@atlaskit/platform-feature-flags';
31
30
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
32
31
  import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
@@ -1021,7 +1020,7 @@ export var DragHandle = function DragHandle(_ref2) {
1021
1020
  css: [editorExperiment('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
1022
1021
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
1023
1022
  // See https://product-fabric.atlassian.net/browse/ED-26266
1024
- browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorExperiment('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && isFocused && keyboardFocusedDragHandleStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? focusedStyles : focusedStylesOld, expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') && dragHandleButtonDenseModeStyles],
1023
+ browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorExperiment('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && isFocused && keyboardFocusedDragHandleStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? focusedStyles : focusedStylesOld, (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && dragHandleButtonDenseModeStyles],
1025
1024
  ref: buttonRef
1026
1025
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1027
1026
  ,
@@ -1046,8 +1045,6 @@ export var DragHandle = function DragHandle(_ref2) {
1046
1045
  }, jsx(DragHandleVerticalIcon, {
1047
1046
  spacing: "spacious",
1048
1047
  label: "",
1049
- LEGACY_fallbackIcon: DragHandlerIcon,
1050
- LEGACY_size: "medium",
1051
1048
  size: "small"
1052
1049
  })))
1053
1050
  );
@@ -105,7 +105,6 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
105
105
  api = _ref.api,
106
106
  formatMessage = _ref.formatMessage,
107
107
  getPos = _ref.getPos,
108
- nodeType = _ref.nodeType,
109
108
  anchorName = _ref.anchorName,
110
109
  rootAnchorName = _ref.rootAnchorName,
111
110
  rootNodeType = _ref.rootNodeType,
@@ -286,7 +285,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
286
285
  testId: "editor-quick-insert-button",
287
286
  type: "button",
288
287
  "aria-label": formatMessage(messages.insert),
289
- xcss: [stickyButtonStyles, expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') && stickyButtonDenseModeStyles],
288
+ xcss: [stickyButtonStyles, (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && stickyButtonDenseModeStyles],
290
289
  onClick: handleQuickInsert,
291
290
  onMouseDown: handleMouseDown
292
291
  }, jsx(AddIcon, {
@@ -19,6 +19,6 @@ type Props = {
19
19
  rootNodeType: string;
20
20
  view: EditorView;
21
21
  };
22
- export declare const TypeAheadControl: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
22
+ export declare const TypeAheadControl: ({ view, api, formatMessage, getPos, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
23
23
  export declare const QuickInsertWithVisibility: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
24
24
  export {};
@@ -19,6 +19,6 @@ type Props = {
19
19
  rootNodeType: string;
20
20
  view: EditorView;
21
21
  };
22
- export declare const TypeAheadControl: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
22
+ export declare const TypeAheadControl: ({ view, api, formatMessage, getPos, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
23
23
  export declare const QuickInsertWithVisibility: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
24
24
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "7.14.1",
3
+ "version": "7.15.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/editor-prosemirror": "^7.2.0",
47
47
  "@atlaskit/editor-shared-styles": "^3.10.0",
48
48
  "@atlaskit/editor-tables": "^2.9.0",
49
- "@atlaskit/icon": "^29.1.0",
49
+ "@atlaskit/icon": "^29.3.0",
50
50
  "@atlaskit/link": "^3.2.0",
51
51
  "@atlaskit/platform-feature-flags": "^1.1.0",
52
52
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
@@ -54,8 +54,8 @@
54
54
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
55
55
  "@atlaskit/primitives": "^16.4.0",
56
56
  "@atlaskit/theme": "^21.0.0",
57
- "@atlaskit/tmp-editor-statsig": "^15.12.0",
58
- "@atlaskit/tokens": "^8.5.0",
57
+ "@atlaskit/tmp-editor-statsig": "^15.15.0",
58
+ "@atlaskit/tokens": "^8.6.0",
59
59
  "@atlaskit/tooltip": "^20.11.0",
60
60
  "@babel/runtime": "^7.0.0",
61
61
  "@emotion/react": "^11.7.1",
@@ -66,7 +66,7 @@
66
66
  "uuid": "^3.1.0"
67
67
  },
68
68
  "peerDependencies": {
69
- "@atlaskit/editor-common": "^110.44.0",
69
+ "@atlaskit/editor-common": "^110.46.0",
70
70
  "react": "^18.2.0",
71
71
  "react-dom": "^18.2.0",
72
72
  "react-intl-next": "npm:react-intl@^5.18.1"