@atlaskit/editor-plugin-panel 5.1.3 → 5.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,23 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 5.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#188597](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/188597)
8
+ [`4de5a96f3e24c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4de5a96f3e24c) -
9
+ [ED-28523] Enable new editor element toolbars UI for Jira
10
+ - Updated dependencies
11
+
12
+ ## 5.1.4
13
+
14
+ ### Patch Changes
15
+
16
+ - [#187144](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187144)
17
+ [`a16147d8fbdfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a16147d8fbdfe) -
18
+ Bump @atlaskit/adf-schema to v49.0.5
19
+ - Updated dependencies
20
+
3
21
  ## 5.1.3
4
22
 
5
23
  ### Patch Changes
@@ -13,6 +13,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
13
13
  var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
14
14
  var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
15
15
  var _panel = require("@atlaskit/editor-common/panel");
16
+ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
16
17
  var _uiColor = require("@atlaskit/editor-common/ui-color");
17
18
  var _utils = require("@atlaskit/editor-prosemirror/utils");
18
19
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
@@ -26,7 +27,6 @@ var _successEditorSuccess = _interopRequireDefault(require("@atlaskit/icon/core/
26
27
  var _warningEditorWarning = _interopRequireDefault(require("@atlaskit/icon/core/migration/warning--editor-warning"));
27
28
  var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
28
29
  var _removeEmoji = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove-emoji"));
29
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
30
30
  var _actions = require("../editor-actions/actions");
31
31
  var _utils2 = require("../pm-plugins/utils/utils");
32
32
  var _panelTypeDropdown = require("./panelTypeDropdown");
@@ -53,8 +53,9 @@ var panelIconMap = exports.panelIconMap = (0, _defineProperty2.default)((0, _def
53
53
  id: 'atlassian-tip'
54
54
  });
55
55
  var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state, api) {
56
+ var isNewEditorToolbarDisabled = !(0, _toolbarFlagCheck.areToolbarFlagsEnabled)();
56
57
  // TODO: ED-14403 - investigate why these titles are not getting translated for the tooltips
57
- var items = (0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? [{
58
+ var items = isNewEditorToolbarDisabled ? [{
58
59
  id: 'editor.panel.info',
59
60
  type: 'button',
60
61
  icon: _informationEditorInfo.default,
@@ -247,7 +248,7 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
247
248
  }, colorPicker);
248
249
  }
249
250
  }
250
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'control')) {
251
+ if (isNewEditorToolbarDisabled) {
251
252
  if (state) {
252
253
  items.push({
253
254
  type: 'separator'
@@ -342,7 +343,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(stat
342
343
  };
343
344
 
344
345
  // force toolbar to be turned on
345
- var items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? api : undefined);
346
+ var items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state, (0, _toolbarFlagCheck.areToolbarFlagsEnabled)() ? api : undefined);
346
347
  var getDomRef = function getDomRef(editorView) {
347
348
  var domAtPos = editorView.domAtPos.bind(editorView);
348
349
  var element = (0, _utils.findDomRefAtPos)(panelObject.pos, domAtPos);
@@ -4,6 +4,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
4
4
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
5
5
  import commonMessages, { panelMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
7
+ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
7
8
  import { DEFAULT_BORDER_COLOR, panelBackgroundPalette } from '@atlaskit/editor-common/ui-color';
8
9
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
9
10
  import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
@@ -17,7 +18,6 @@ import SuccessIcon from '@atlaskit/icon/core/migration/success--editor-success';
17
18
  import WarningIcon from '@atlaskit/icon/core/migration/warning--editor-warning';
18
19
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
19
20
  import RemoveEmojiIcon from '@atlaskit/icon/glyph/editor/remove-emoji';
20
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
21
  import { changePanelType, removePanel } from '../editor-actions/actions';
22
22
  import { findPanel } from '../pm-plugins/utils/utils';
23
23
  import { panelTypeDropdown } from './panelTypeDropdown';
@@ -48,8 +48,9 @@ export const panelIconMap = {
48
48
  }
49
49
  };
50
50
  export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state, api) => {
51
+ const isNewEditorToolbarDisabled = !areToolbarFlagsEnabled();
51
52
  // TODO: ED-14403 - investigate why these titles are not getting translated for the tooltips
52
- const items = editorExperiment('platform_editor_controls', 'control') ? [{
53
+ const items = isNewEditorToolbarDisabled ? [{
53
54
  id: 'editor.panel.info',
54
55
  type: 'button',
55
56
  icon: InformationIcon,
@@ -230,7 +231,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
230
231
  }, colorPicker);
231
232
  }
232
233
  }
233
- if (editorExperiment('platform_editor_controls', 'control')) {
234
+ if (isNewEditorToolbarDisabled) {
234
235
  if (state) {
235
236
  items.push({
236
237
  type: 'separator'
@@ -323,7 +324,7 @@ export const getToolbarConfig = (state, intl, options = {}, providerFactory, api
323
324
  };
324
325
 
325
326
  // force toolbar to be turned on
326
- const items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, api === null || api === void 0 ? void 0 : (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state, editorExperiment('platform_editor_controls', 'variant1') ? api : undefined);
327
+ const items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, api === null || api === void 0 ? void 0 : (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state, areToolbarFlagsEnabled() ? api : undefined);
327
328
  const getDomRef = editorView => {
328
329
  const domAtPos = editorView.domAtPos.bind(editorView);
329
330
  const element = findDomRefAtPos(panelObject.pos, domAtPos);
@@ -7,6 +7,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
7
7
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
8
8
  import commonMessages, { panelMessages as messages } from '@atlaskit/editor-common/messages';
9
9
  import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
10
+ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
10
11
  import { DEFAULT_BORDER_COLOR, panelBackgroundPalette } from '@atlaskit/editor-common/ui-color';
11
12
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
12
13
  import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
@@ -20,7 +21,6 @@ import SuccessIcon from '@atlaskit/icon/core/migration/success--editor-success';
20
21
  import WarningIcon from '@atlaskit/icon/core/migration/warning--editor-warning';
21
22
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
22
23
  import RemoveEmojiIcon from '@atlaskit/icon/glyph/editor/remove-emoji';
23
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
24
24
  import { changePanelType, removePanel } from '../editor-actions/actions';
25
25
  import { findPanel } from '../pm-plugins/utils/utils';
26
26
  import { panelTypeDropdown } from './panelTypeDropdown';
@@ -44,8 +44,9 @@ export var panelIconMap = _defineProperty(_defineProperty(_defineProperty(_defin
44
44
  id: 'atlassian-tip'
45
45
  });
46
46
  export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state, api) {
47
+ var isNewEditorToolbarDisabled = !areToolbarFlagsEnabled();
47
48
  // TODO: ED-14403 - investigate why these titles are not getting translated for the tooltips
48
- var items = editorExperiment('platform_editor_controls', 'control') ? [{
49
+ var items = isNewEditorToolbarDisabled ? [{
49
50
  id: 'editor.panel.info',
50
51
  type: 'button',
51
52
  icon: InformationIcon,
@@ -238,7 +239,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
238
239
  }, colorPicker);
239
240
  }
240
241
  }
241
- if (editorExperiment('platform_editor_controls', 'control')) {
242
+ if (isNewEditorToolbarDisabled) {
242
243
  if (state) {
243
244
  items.push({
244
245
  type: 'separator'
@@ -333,7 +334,7 @@ export var getToolbarConfig = function getToolbarConfig(state, intl) {
333
334
  };
334
335
 
335
336
  // force toolbar to be turned on
336
- var items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state, editorExperiment('platform_editor_controls', 'variant1') ? api : undefined);
337
+ var items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state, areToolbarFlagsEnabled() ? api : undefined);
337
338
  var getDomRef = function getDomRef(editorView) {
338
339
  var domAtPos = editorView.domAtPos.bind(editorView);
339
340
  var element = findDomRefAtPos(panelObject.pos, domAtPos);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "5.1.3",
3
+ "version": "5.1.5",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,24 +30,24 @@
30
30
  ".": "./src/index.ts"
31
31
  },
32
32
  "dependencies": {
33
- "@atlaskit/adf-schema": "^47.6.0",
33
+ "@atlaskit/adf-schema": "^49.0.6",
34
34
  "@atlaskit/editor-palette": "^2.1.0",
35
35
  "@atlaskit/editor-plugin-analytics": "^3.0.0",
36
36
  "@atlaskit/editor-plugin-decorations": "^3.0.0",
37
37
  "@atlaskit/editor-plugin-emoji": "^4.0.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
- "@atlaskit/editor-shared-styles": "^3.4.0",
39
+ "@atlaskit/editor-shared-styles": "^3.5.0",
40
40
  "@atlaskit/emoji": "^69.3.0",
41
- "@atlaskit/icon": "^27.3.0",
41
+ "@atlaskit/icon": "^27.5.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
43
  "@atlaskit/theme": "^19.0.0",
44
- "@atlaskit/tmp-editor-statsig": "^9.1.0",
45
- "@atlaskit/tokens": "^5.4.0",
44
+ "@atlaskit/tmp-editor-statsig": "^9.9.0",
45
+ "@atlaskit/tokens": "^5.6.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "uuid": "^3.1.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^107.7.0",
50
+ "@atlaskit/editor-common": "^107.9.0",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-intl-next": "npm:react-intl@^5.18.1"