@atlaskit/editor-plugin-floating-toolbar 5.1.5 → 5.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 5.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`558ab977a6b1c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/558ab977a6b1c) -
8
+ Remove feature gate: platform_editor_overflow_dropdown_click_analytics
9
+ - Updated dependencies
10
+
11
+ ## 5.1.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [#195965](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/195965)
16
+ [`7fda5827b37c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7fda5827b37c1) -
17
+ ENGHEALTH-32254 Add aria-label to dropdownButtonItem so that ariaLabel from ai button will be
18
+ passed in
19
+ - Updated dependencies
20
+
3
21
  ## 5.1.5
4
22
 
5
23
  ### Patch Changes
@@ -23,7 +23,6 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
23
23
  var _ui = require("@atlaskit/editor-common/ui");
24
24
  var _state = require("@atlaskit/editor-prosemirror/state");
25
25
  var _utils = require("@atlaskit/editor-prosemirror/utils");
26
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
26
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
28
27
  var _commands = require("./pm-plugins/commands");
29
28
  var _forceFocus = _interopRequireWildcard(require("./pm-plugins/force-focus"));
@@ -316,7 +315,7 @@ function ContentComponent(_ref5) {
316
315
  }
317
316
 
318
317
  // Apply analytics to dropdown
319
- if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent && (0, _platformFeatureFlags.fg)('platform_editor_overflow_dropdown_click_analytics')) {
318
+ if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent) {
320
319
  var _items3;
321
320
  var currentItems = Array.isArray(items) ? items : (_items3 = items) === null || _items3 === void 0 ? void 0 : _items3(node);
322
321
  var updatedItems = currentItems.map(function (item) {
@@ -27,6 +27,7 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
27
27
  var _editorPalette = require("@atlaskit/editor-palette");
28
28
  var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
29
29
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
30
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
30
31
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
31
32
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
32
33
  var _forceFocus = require("../pm-plugins/force-focus");
@@ -172,6 +173,7 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
172
173
  ariaHasPopup: item.ariaHasPopup,
173
174
  tabIndex: item.tabIndex,
174
175
  isRadioButton: item.isRadioButton,
176
+ ariaLabel: (0, _expValEquals.expValEquals)('platform_editor_floating_toolbar_button_aria_label', 'isEnabled', true) ? item === null || item === void 0 ? void 0 : item.ariaLabel : undefined,
175
177
  pulse: item.pulse,
176
178
  spotlightConfig: item.spotlightConfig,
177
179
  interactionName: item.interactionName
@@ -12,7 +12,6 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
12
12
  import { Popup } from '@atlaskit/editor-common/ui';
13
13
  import { AllSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
14
14
  import { findDomRefAtPos, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
16
  import { copyNode } from './pm-plugins/commands';
18
17
  import forceFocusPlugin, { forceFocusSelector } from './pm-plugins/force-focus';
@@ -301,7 +300,7 @@ export function ContentComponent({
301
300
  }
302
301
 
303
302
  // Apply analytics to dropdown
304
- if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent && fg('platform_editor_overflow_dropdown_click_analytics')) {
303
+ if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent) {
305
304
  var _items3;
306
305
  const currentItems = Array.isArray(items) ? items : (_items3 = items) === null || _items3 === void 0 ? void 0 : _items3(node);
307
306
  const updatedItems = currentItems.map(item => {
@@ -20,6 +20,7 @@ import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/
20
20
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
21
21
  import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
22
22
  import { fg } from '@atlaskit/platform-feature-flags';
23
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
23
24
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
24
25
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
25
26
  import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
@@ -154,6 +155,7 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
154
155
  ariaHasPopup: item.ariaHasPopup,
155
156
  tabIndex: item.tabIndex,
156
157
  isRadioButton: item.isRadioButton,
158
+ ariaLabel: expValEquals('platform_editor_floating_toolbar_button_aria_label', 'isEnabled', true) ? item === null || item === void 0 ? void 0 : item.ariaLabel : undefined,
157
159
  pulse: item.pulse,
158
160
  spotlightConfig: item.spotlightConfig,
159
161
  interactionName: item.interactionName
@@ -16,7 +16,6 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
16
16
  import { Popup } from '@atlaskit/editor-common/ui';
17
17
  import { AllSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
18
18
  import { findDomRefAtPos, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
19
- import { fg } from '@atlaskit/platform-feature-flags';
20
19
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
20
  import { copyNode as _copyNode } from './pm-plugins/commands';
22
21
  import forceFocusPlugin, { forceFocusSelector } from './pm-plugins/force-focus';
@@ -307,7 +306,7 @@ export function ContentComponent(_ref5) {
307
306
  }
308
307
 
309
308
  // Apply analytics to dropdown
310
- if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent && fg('platform_editor_overflow_dropdown_click_analytics')) {
309
+ if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent) {
311
310
  var _items3;
312
311
  var currentItems = Array.isArray(items) ? items : (_items3 = items) === null || _items3 === void 0 ? void 0 : _items3(node);
313
312
  var updatedItems = currentItems.map(function (item) {
@@ -27,6 +27,7 @@ import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/
27
27
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
28
28
  import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
29
29
  import { fg } from '@atlaskit/platform-feature-flags';
30
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
30
31
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
31
32
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
32
33
  import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
@@ -166,6 +167,7 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
166
167
  ariaHasPopup: item.ariaHasPopup,
167
168
  tabIndex: item.tabIndex,
168
169
  isRadioButton: item.isRadioButton,
170
+ ariaLabel: expValEquals('platform_editor_floating_toolbar_button_aria_label', 'isEnabled', true) ? item === null || item === void 0 ? void 0 : item.ariaLabel : undefined,
169
171
  pulse: item.pulse,
170
172
  spotlightConfig: item.spotlightConfig,
171
173
  interactionName: item.interactionName
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "5.1.5",
3
+ "version": "5.1.7",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/primitives": "^14.11.0",
49
49
  "@atlaskit/select": "^21.2.0",
50
50
  "@atlaskit/theme": "^19.0.0",
51
- "@atlaskit/tmp-editor-statsig": "^9.22.0",
51
+ "@atlaskit/tmp-editor-statsig": "^9.24.0",
52
52
  "@atlaskit/tokens": "^6.0.0",
53
53
  "@atlaskit/tooltip": "^20.4.0",
54
54
  "@babel/runtime": "^7.0.0",
@@ -60,7 +60,7 @@
60
60
  "react-loadable": "^5.1.0"
61
61
  },
62
62
  "peerDependencies": {
63
- "@atlaskit/editor-common": "^107.16.0",
63
+ "@atlaskit/editor-common": "^107.17.0",
64
64
  "react": "^18.2.0",
65
65
  "react-dom": "^18.2.0"
66
66
  },
@@ -129,9 +129,6 @@
129
129
  },
130
130
  "platform_editor_user_intent_plugin": {
131
131
  "type": "boolean"
132
- },
133
- "platform_editor_overflow_dropdown_click_analytics": {
134
- "type": "boolean"
135
132
  }
136
133
  }
137
134
  }