@atlaskit/editor-plugin-insert-block 7.0.10 → 7.0.11

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-insert-block
2
2
 
3
+ ## 7.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ef001bf65d48f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef001bf65d48f) -
8
+ Remove usage of `platform_editor_toolbar_aifc` inside editor packages - instead rely on checking
9
+ for new toolbar plugin option, make `enableNewToolbarExperience` mandatory for consumers to opt in
10
+ to new toolbar experience
11
+ - Updated dependencies
12
+
3
13
  ## 7.0.10
4
14
 
5
15
  ### Patch Changes
@@ -106,6 +106,7 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
106
106
  var _ref$config = _ref.config,
107
107
  options = _ref$config === void 0 ? {} : _ref$config,
108
108
  api = _ref.api;
109
+ var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
109
110
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
110
111
  var editorView = _ref2.editorView,
111
112
  editorActions = _ref2.editorActions,
@@ -167,9 +168,7 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
167
168
  renderNode: renderNode
168
169
  });
169
170
  };
170
- if (Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
171
- exposure: true
172
- })) {
171
+ if (isToolbarAIFCEnabled) {
173
172
  var _api$toolbar, _api$codeBlock, _api$panel, _api$blockType;
174
173
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)({
175
174
  api: api,
@@ -724,7 +724,7 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
724
724
  }
725
725
  return (0, _react2.jsx)("span", {
726
726
  css:
727
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
727
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
728
728
  (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ?
729
729
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
730
730
  _styles.buttonGroupStyle :
@@ -52,6 +52,7 @@ var TableButton = exports.TableButton = function TableButton(_ref) {
52
52
  size: "small"
53
53
  }),
54
54
  onClick: onClick,
55
- ariaKeyshortcuts: (0, _keymaps.getAriaKeyshortcuts)(_keymaps.toggleTable)
55
+ ariaKeyshortcuts: (0, _keymaps.getAriaKeyshortcuts)(_keymaps.toggleTable),
56
+ testId: "Table"
56
57
  }));
57
58
  };
@@ -90,6 +90,7 @@ export const insertBlockPlugin = ({
90
90
  config: options = {},
91
91
  api
92
92
  }) => {
93
+ const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
93
94
  const primaryToolbarComponent = ({
94
95
  editorView,
95
96
  editorActions,
@@ -152,9 +153,7 @@ export const insertBlockPlugin = ({
152
153
  renderNode: renderNode
153
154
  });
154
155
  };
155
- if (Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true, {
156
- exposure: true
157
- })) {
156
+ if (isToolbarAIFCEnabled) {
158
157
  var _api$toolbar, _api$codeBlock, _api$panel, _api$blockType;
159
158
  api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents({
160
159
  api,
@@ -766,7 +766,7 @@ export class ToolbarInsertBlock extends React.PureComponent {
766
766
  }
767
767
  return jsx("span", {
768
768
  css:
769
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
769
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
770
770
  fg('platform-visual-refresh-icons') ?
771
771
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
772
772
  buttonGroupStyle :
@@ -50,6 +50,7 @@ export const TableButton = ({
50
50
  size: "small"
51
51
  }),
52
52
  onClick: onClick,
53
- ariaKeyshortcuts: getAriaKeyshortcuts(toggleTable)
53
+ ariaKeyshortcuts: getAriaKeyshortcuts(toggleTable),
54
+ testId: "Table"
54
55
  }));
55
56
  };
@@ -96,6 +96,7 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
96
96
  var _ref$config = _ref.config,
97
97
  options = _ref$config === void 0 ? {} : _ref$config,
98
98
  api = _ref.api;
99
+ var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
99
100
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
100
101
  var editorView = _ref2.editorView,
101
102
  editorActions = _ref2.editorActions,
@@ -157,9 +158,7 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
157
158
  renderNode: renderNode
158
159
  });
159
160
  };
160
- if (Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true, {
161
- exposure: true
162
- })) {
161
+ if (isToolbarAIFCEnabled) {
163
162
  var _api$toolbar, _api$codeBlock, _api$panel, _api$blockType;
164
163
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents({
165
164
  api: api,
@@ -718,7 +718,7 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
718
718
  }
719
719
  return jsx("span", {
720
720
  css:
721
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
721
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
722
722
  fg('platform-visual-refresh-icons') ?
723
723
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
724
724
  buttonGroupStyle :
@@ -45,6 +45,7 @@ export var TableButton = function TableButton(_ref) {
45
45
  size: "small"
46
46
  }),
47
47
  onClick: onClick,
48
- ariaKeyshortcuts: getAriaKeyshortcuts(toggleTable)
48
+ ariaKeyshortcuts: getAriaKeyshortcuts(toggleTable),
49
+ testId: "Table"
49
50
  }));
50
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "7.0.10",
3
+ "version": "7.0.11",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/editor-plugin-code-block": "^8.0.0",
36
36
  "@atlaskit/editor-plugin-connectivity": "^6.0.0",
37
37
  "@atlaskit/editor-plugin-date": "^8.0.0",
38
- "@atlaskit/editor-plugin-emoji": "^7.1.0",
38
+ "@atlaskit/editor-plugin-emoji": "^7.2.0",
39
39
  "@atlaskit/editor-plugin-expand": "^7.1.0",
40
40
  "@atlaskit/editor-plugin-extension": "^9.0.0",
41
41
  "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/editor-plugin-toolbar": "^3.2.0",
58
58
  "@atlaskit/editor-plugin-type-ahead": "^6.4.0",
59
59
  "@atlaskit/editor-prosemirror": "7.0.0",
60
- "@atlaskit/editor-shared-styles": "^3.6.0",
60
+ "@atlaskit/editor-shared-styles": "^3.7.0",
61
61
  "@atlaskit/editor-toolbar": "^0.15.0",
62
62
  "@atlaskit/editor-toolbar-model": "^0.2.0",
63
63
  "@atlaskit/emoji": "^69.5.0",
@@ -67,7 +67,7 @@
67
67
  "@atlaskit/platform-feature-flags": "^1.1.0",
68
68
  "@atlaskit/primitives": "^14.15.0",
69
69
  "@atlaskit/theme": "^21.0.0",
70
- "@atlaskit/tmp-editor-statsig": "^13.8.0",
70
+ "@atlaskit/tmp-editor-statsig": "^13.10.0",
71
71
  "@atlaskit/tokens": "^6.4.0",
72
72
  "@atlaskit/tooltip": "^20.5.0",
73
73
  "@babel/runtime": "^7.0.0",