@atlaskit/editor-plugin-track-changes 3.0.6 → 3.0.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,15 @@
1
1
  # @atlaskit/editor-plugin-track-changes
2
2
 
3
+ ## 3.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c0113eeccb2df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0113eeccb2df) -
8
+ [ux] ED-29120 add a new config option for default editor preset
9
+ (`toolbar.enableNewToolbarExperience`) which allows the new toolbar to be disabled. This is needed
10
+ for editors that can't be excluded at the experiment level.
11
+ - Updated dependencies
12
+
3
13
  ## 3.0.6
4
14
 
5
15
  ### Patch Changes
@@ -20,7 +20,7 @@ var trackChangesPlugin = exports.trackChangesPlugin = function trackChangesPlugi
20
20
  });
21
21
  };
22
22
  if ((options === null || options === void 0 ? void 0 : options.showOnToolbar) === true) {
23
- if ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)) {
23
+ if (Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)) {
24
24
  var _api$toolbar;
25
25
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
26
26
  } else {
@@ -36,7 +36,7 @@ var TrackChangesToolbarButton = exports.TrackChangesToolbarButton = function Tra
36
36
  }, [api, isDisplayingChanges]);
37
37
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
38
38
  content: formatMessage(_messages.trackChangesMessages.toolbarIconLabel)
39
- }, (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) ? /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
39
+ }, Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) ? /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
40
40
  iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.HistoryIcon, {
41
41
  label: formatMessage(_messages.trackChangesMessages.toolbarIconLabel),
42
42
  size: "small"
@@ -14,7 +14,7 @@ export const trackChangesPlugin = ({
14
14
  });
15
15
  };
16
16
  if ((options === null || options === void 0 ? void 0 : options.showOnToolbar) === true) {
17
- if (editorExperiment('platform_editor_toolbar_aifc', true)) {
17
+ if (Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true)) {
18
18
  var _api$toolbar;
19
19
  api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents(api));
20
20
  } else {
@@ -32,7 +32,7 @@ export const TrackChangesToolbarButton = ({
32
32
  }, [api, isDisplayingChanges]);
33
33
  return /*#__PURE__*/React.createElement(ToolbarTooltip, {
34
34
  content: formatMessage(trackChangesMessages.toolbarIconLabel)
35
- }, editorExperiment('platform_editor_toolbar_aifc', true) ? /*#__PURE__*/React.createElement(ToolbarButton, {
35
+ }, Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true) ? /*#__PURE__*/React.createElement(ToolbarButton, {
36
36
  iconBefore: /*#__PURE__*/React.createElement(HistoryIcon, {
37
37
  label: formatMessage(trackChangesMessages.toolbarIconLabel),
38
38
  size: "small"
@@ -13,7 +13,7 @@ export var trackChangesPlugin = function trackChangesPlugin(_ref) {
13
13
  });
14
14
  };
15
15
  if ((options === null || options === void 0 ? void 0 : options.showOnToolbar) === true) {
16
- if (editorExperiment('platform_editor_toolbar_aifc', true)) {
16
+ if (Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true)) {
17
17
  var _api$toolbar;
18
18
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api));
19
19
  } else {
@@ -29,7 +29,7 @@ export var TrackChangesToolbarButton = function TrackChangesToolbarButton(_ref)
29
29
  }, [api, isDisplayingChanges]);
30
30
  return /*#__PURE__*/React.createElement(ToolbarTooltip, {
31
31
  content: formatMessage(trackChangesMessages.toolbarIconLabel)
32
- }, editorExperiment('platform_editor_toolbar_aifc', true) ? /*#__PURE__*/React.createElement(ToolbarButton, {
32
+ }, Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true) ? /*#__PURE__*/React.createElement(ToolbarButton, {
33
33
  iconBefore: /*#__PURE__*/React.createElement(HistoryIcon, {
34
34
  label: formatMessage(trackChangesMessages.toolbarIconLabel),
35
35
  size: "small"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-track-changes",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,17 +32,17 @@
32
32
  "@atlaskit/editor-plugin-history": "4.0.0",
33
33
  "@atlaskit/editor-plugin-primary-toolbar": "^5.0.0",
34
34
  "@atlaskit/editor-plugin-show-diff": "1.0.1",
35
- "@atlaskit/editor-plugin-toolbar": "^1.1.0",
35
+ "@atlaskit/editor-plugin-toolbar": "^1.2.0",
36
36
  "@atlaskit/editor-prosemirror": "7.0.0",
37
37
  "@atlaskit/editor-toolbar": "^0.8.0",
38
38
  "@atlaskit/editor-toolbar-model": "^0.2.0",
39
39
  "@atlaskit/icon-lab": "^5.7.0",
40
- "@atlaskit/tmp-editor-statsig": "^12.5.0",
40
+ "@atlaskit/tmp-editor-statsig": "^12.8.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "react-intl-next": "npm:react-intl@^5.18.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^108.3.0",
45
+ "@atlaskit/editor-common": "^108.6.0",
46
46
  "react": "^18.2.0"
47
47
  },
48
48
  "techstack": {