@atlaskit/editor-plugin-highlight 15.1.4 → 15.1.5

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,15 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 15.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
8
+ VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
9
+ voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
10
+ changes.
11
+ - Updated dependencies
12
+
3
13
  ## 15.1.4
4
14
 
5
15
  ### Patch Changes
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _adfSchema = require("@atlaskit/adf-schema");
11
11
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
14
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
15
  var _changeColor = require("./editor-commands/change-color");
@@ -106,7 +106,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
106
106
  pluginsOptions: !isToolbarAIFCEnabled ? {
107
107
  selectionToolbar: function selectionToolbar() {
108
108
  var _api$userPreferences, _api$selectionToolbar;
109
- var toolbarDocking = (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
109
+ var toolbarDocking = (0, _fg.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
110
110
  if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
111
111
  exposure: true
112
112
  })) {
@@ -20,10 +20,10 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
20
20
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
21
21
  var _editorPalette = require("@atlaskit/editor-palette");
22
22
  var _editorToolbar = require("@atlaskit/editor-toolbar");
23
- var _heading = _interopRequireDefault(require("@atlaskit/heading"));
23
+ var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
24
24
  var _checkMark = _interopRequireDefault(require("@atlaskit/icon/core/check-mark"));
25
25
  var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"));
26
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
27
27
  var _compiled = require("@atlaskit/primitives/compiled");
28
28
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
29
29
  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); }
@@ -122,7 +122,7 @@ function HighlightColorMenuItem(_ref3) {
122
122
  var iconColor = getTextColorIconColor(defaultColor, textColor, isNewColorPaletteEnabled);
123
123
  var highlightPalette = isNewColorPaletteEnabled ? _uiColor.highlightColorPaletteNew : _uiColor.highlightColorPalette;
124
124
  return highlightPalette.filter(function (color) {
125
- if (!isNewColorPaletteEnabled || (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
125
+ if (!isNewColorPaletteEnabled || (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
126
126
  return color.value !== _uiColor.REMOVE_HIGHLIGHT_COLOR;
127
127
  }
128
128
  return color.label !== 'Red';
@@ -141,7 +141,7 @@ function HighlightColorMenuItem(_ref3) {
141
141
  }, [defaultColor, textColor, isNewColorPaletteEnabled, selectedColor]);
142
142
  var colorPaletteElement = /*#__PURE__*/React.createElement(_editorToolbar.ColorPalette, {
143
143
  cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
144
- gap: isNewColorPaletteEnabled && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
144
+ gap: isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
145
145
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
146
146
  ,
147
147
  onClick: function onClick(color, _, event) {
@@ -156,11 +156,11 @@ function HighlightColorMenuItem(_ref3) {
156
156
  }
157
157
  });
158
158
  return /*#__PURE__*/React.createElement(_compiled.Stack, {
159
- xcss: (0, _css.cx)(styles.container, isNewColorPaletteEnabled && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
159
+ xcss: (0, _css.cx)(styles.container, isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
160
160
  testId: "highlight-color-menu-item"
161
161
  }, /*#__PURE__*/React.createElement(_heading.default, {
162
162
  size: "xxsmall"
163
- }, formatMessage(_messages.highlightMessages.highlight)), isNewColorPaletteEnabled && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(_compiled.Bleed, {
163
+ }, formatMessage(_messages.highlightMessages.highlight)), isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(_compiled.Bleed, {
164
164
  inline: "space.025"
165
165
  }, colorPaletteElement) : colorPaletteElement);
166
166
  }
@@ -10,7 +10,7 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
10
10
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
11
11
  var _editorPalette = require("@atlaskit/editor-palette");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
14
14
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
15
  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); }
16
16
  var HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
@@ -27,7 +27,7 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
27
27
  handleClickOutside = props.handleClickOutside,
28
28
  handleEscapeKeydown = props.handleEscapeKeydown;
29
29
  var isNewColorPaletteEnabled = (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true);
30
- var isRedHighlightEnabled = (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1');
30
+ var isRedHighlightEnabled = (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1');
31
31
  var highlightPalette = (0, _react.useMemo)(function () {
32
32
  if (isNewColorPaletteEnabled) {
33
33
  return _uiColor.highlightColorPaletteNew.filter(function (color) {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { backgroundColor } from '@atlaskit/adf-schema';
3
3
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
5
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
7
  import { changeColor } from './editor-commands/change-color';
@@ -11,10 +11,10 @@ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew
11
11
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
12
12
  import { hexToEditorTextBackgroundPaletteColor, hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
13
13
  import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
14
- import Heading from '@atlaskit/heading';
14
+ import Heading from '@atlaskit/heading/heading';
15
15
  import EditorDoneIcon from '@atlaskit/icon/core/check-mark';
16
16
  import Icon from '@atlaskit/icon/core/text-style';
17
- import { fg } from '@atlaskit/platform-feature-flags';
17
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
18
18
  import { Bleed, Stack, Box } from '@atlaskit/primitives/compiled';
19
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
20
  const HIGHLIGHT_COLOR_PICKER_COLUMNS = 10;
@@ -3,7 +3,7 @@ import { ColorPalette, REMOVE_HIGHLIGHT_COLOR, getSelectedRowAndColumnFromPalett
3
3
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
4
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
5
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  const HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
9
9
  const HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW = 10;
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import React from 'react';
5
5
  import { backgroundColor } from '@atlaskit/adf-schema';
6
6
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
- import { fg } from '@atlaskit/platform-feature-flags';
7
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
8
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
10
  import { changeColor } from './editor-commands/change-color';
@@ -14,10 +14,10 @@ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew
14
14
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
15
15
  import { hexToEditorTextBackgroundPaletteColor, hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
16
16
  import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
17
- import Heading from '@atlaskit/heading';
17
+ import Heading from '@atlaskit/heading/heading';
18
18
  import EditorDoneIcon from '@atlaskit/icon/core/check-mark';
19
19
  import Icon from '@atlaskit/icon/core/text-style';
20
- import { fg } from '@atlaskit/platform-feature-flags';
20
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
21
21
  import { Bleed, Stack, Box } from '@atlaskit/primitives/compiled';
22
22
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
23
23
  var HIGHLIGHT_COLOR_PICKER_COLUMNS = 10;
@@ -3,7 +3,7 @@ import { ColorPalette, REMOVE_HIGHLIGHT_COLOR, getSelectedRowAndColumnFromPalett
3
3
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
4
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
5
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  var HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
9
9
  var HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW = 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "15.1.4",
3
+ "version": "15.1.5",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",