@atlaskit/editor-core 215.4.0 → 215.5.0

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,24 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 215.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c1691aca7fb1d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c1691aca7fb1d) -
8
+ Surface extension keys into quick insert provider
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 215.4.1
15
+
16
+ ### Patch Changes
17
+
18
+ - [`2fc927b3b7437`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2fc927b3b7437) -
19
+ [ux] ED29532 Add keyboard navigation provider to comment toolbar
20
+ - Updated dependencies
21
+
3
22
  ## 215.4.0
4
23
 
5
24
  ### Minor Changes
@@ -19,6 +19,7 @@ var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages
19
19
  var _ui = require("@atlaskit/editor-common/ui");
20
20
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
21
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
22
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
23
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
24
  var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
24
25
  var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
@@ -191,7 +192,23 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
191
192
  useStickyToolbar: useStickyToolbar,
192
193
  twoLineEditorToolbar: isTwoLineToolbarEnabled,
193
194
  isNewToolbarEnabled: isToolbarAIFCEnabled
194
- }, isToolbarAIFCEnabled ? (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
195
+ }, isToolbarAIFCEnabled ? (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_7') ? (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
196
+ editorView: editorView,
197
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
198
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
199
+ handleEscape: handleEscape,
200
+ editorAppearance: appearance,
201
+ useStickyToolbar: useStickyToolbar,
202
+ intl: intl
203
+ }, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
204
+ editorAPI: editorAPI,
205
+ editorView: editorView,
206
+ editorAppearance: appearance,
207
+ disabled: patch6Enabled ? !!disabled : undefined,
208
+ popupsBoundariesElement: popupsBoundariesElement,
209
+ popupsScrollableElement: popupsScrollableElement,
210
+ popupsMountPoint: popupsMountPoint
211
+ })) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
195
212
  editorAPI: editorAPI,
196
213
  editorView: editorView,
197
214
  editorAppearance: appearance,
@@ -15,6 +15,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
15
15
  var _extensions = require("@atlaskit/editor-common/extensions");
16
16
  var _providerHelpers = require("@atlaskit/editor-common/provider-helpers");
17
17
  var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20
21
  /**
@@ -95,7 +96,9 @@ function _extensionProviderToQuickInsertProvider() {
95
96
  return null;
96
97
  }
97
98
  });
98
- return {
99
+ return _objectSpread(_objectSpread({}, (0, _platformFeatureFlags.fg)('confluence-whiteboards-quick-insert-l10n-eligible') && {
100
+ key: item.key
101
+ }), {}, {
99
102
  title: item.title,
100
103
  description: item.description,
101
104
  icon: function icon() {
@@ -138,7 +141,7 @@ function _extensionProviderToQuickInsertProvider() {
138
141
  return insert(item.node);
139
142
  }
140
143
  }
141
- };
144
+ });
142
145
  });
143
146
  return Promise.all(quickInsertItems);
144
147
  }
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "215.3.3";
8
+ var version = exports.version = "215.4.1";
@@ -15,6 +15,7 @@ import messages from '@atlaskit/editor-common/messages';
15
15
  import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
16
16
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
17
17
  import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
18
+ import { fg } from '@atlaskit/platform-feature-flags';
18
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
20
  // Ignored via go/ees005
20
21
  // eslint-disable-next-line import/no-named-as-default
@@ -179,7 +180,23 @@ export const CommentEditorWithIntl = props => {
179
180
  useStickyToolbar: useStickyToolbar,
180
181
  twoLineEditorToolbar: isTwoLineToolbarEnabled,
181
182
  isNewToolbarEnabled: isToolbarAIFCEnabled
182
- }, isToolbarAIFCEnabled ? jsx(React.Fragment, null, jsx(CommentToolbar, {
183
+ }, isToolbarAIFCEnabled ? fg('platform_editor_toolbar_aifc_patch_7') ? jsx(ToolbarArrowKeyNavigationProvider, {
184
+ editorView: editorView,
185
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
186
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
187
+ handleEscape: handleEscape,
188
+ editorAppearance: appearance,
189
+ useStickyToolbar: useStickyToolbar,
190
+ intl: intl
191
+ }, jsx(CommentToolbar, {
192
+ editorAPI: editorAPI,
193
+ editorView: editorView,
194
+ editorAppearance: appearance,
195
+ disabled: patch6Enabled ? !!disabled : undefined,
196
+ popupsBoundariesElement: popupsBoundariesElement,
197
+ popupsScrollableElement: popupsScrollableElement,
198
+ popupsMountPoint: popupsMountPoint
199
+ })) : jsx(React.Fragment, null, jsx(CommentToolbar, {
183
200
  editorAPI: editorAPI,
184
201
  editorView: editorView,
185
202
  editorAppearance: appearance,
@@ -4,6 +4,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEve
4
4
  import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
5
5
  import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
6
6
  import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  /**
8
9
  * Utils to send analytics event when a extension is inserted using quickInsert
9
10
  */
@@ -58,6 +59,12 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
58
59
  loading: () => null
59
60
  });
60
61
  return {
62
+ // Add module key so typeahead/quick-insert can identify items
63
+ // **locale-agnostically**! nb: we _already_ send key in analytics
64
+ // events, this standardises and makes our items more predictable.
65
+ ...(fg('confluence-whiteboards-quick-insert-l10n-eligible') && {
66
+ key: item.key
67
+ }),
61
68
  title: item.title,
62
69
  description: item.description,
63
70
  icon: () => /*#__PURE__*/React.createElement(Icon, {
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "215.3.3";
2
+ export const version = "215.4.1";
@@ -17,6 +17,7 @@ import messages from '@atlaskit/editor-common/messages';
17
17
  import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
18
18
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
19
19
  import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
20
+ import { fg } from '@atlaskit/platform-feature-flags';
20
21
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
21
22
  // Ignored via go/ees005
22
23
  // eslint-disable-next-line import/no-named-as-default
@@ -180,7 +181,23 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
180
181
  useStickyToolbar: useStickyToolbar,
181
182
  twoLineEditorToolbar: isTwoLineToolbarEnabled,
182
183
  isNewToolbarEnabled: isToolbarAIFCEnabled
183
- }, isToolbarAIFCEnabled ? jsx(React.Fragment, null, jsx(CommentToolbar, {
184
+ }, isToolbarAIFCEnabled ? fg('platform_editor_toolbar_aifc_patch_7') ? jsx(ToolbarArrowKeyNavigationProvider, {
185
+ editorView: editorView,
186
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
187
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
188
+ handleEscape: handleEscape,
189
+ editorAppearance: appearance,
190
+ useStickyToolbar: useStickyToolbar,
191
+ intl: intl
192
+ }, jsx(CommentToolbar, {
193
+ editorAPI: editorAPI,
194
+ editorView: editorView,
195
+ editorAppearance: appearance,
196
+ disabled: patch6Enabled ? !!disabled : undefined,
197
+ popupsBoundariesElement: popupsBoundariesElement,
198
+ popupsScrollableElement: popupsScrollableElement,
199
+ popupsMountPoint: popupsMountPoint
200
+ })) : jsx(React.Fragment, null, jsx(CommentToolbar, {
184
201
  editorAPI: editorAPI,
185
202
  editorView: editorView,
186
203
  editorAppearance: appearance,
@@ -9,6 +9,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEve
9
9
  import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
10
10
  import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
11
11
  import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  /**
13
14
  * Utils to send analytics event when a extension is inserted using quickInsert
14
15
  */
@@ -89,7 +90,9 @@ function _extensionProviderToQuickInsertProvider() {
89
90
  return null;
90
91
  }
91
92
  });
92
- return {
93
+ return _objectSpread(_objectSpread({}, fg('confluence-whiteboards-quick-insert-l10n-eligible') && {
94
+ key: item.key
95
+ }), {}, {
93
96
  title: item.title,
94
97
  description: item.description,
95
98
  icon: function icon() {
@@ -132,7 +135,7 @@ function _extensionProviderToQuickInsertProvider() {
132
135
  return insert(item.node);
133
136
  }
134
137
  }
135
- };
138
+ });
136
139
  });
137
140
  return Promise.all(quickInsertItems);
138
141
  }
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "215.3.3";
2
+ export var version = "215.4.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "215.4.0",
3
+ "version": "215.5.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
65
65
  "@atlaskit/react-ufo": "^4.12.0",
66
66
  "@atlaskit/task-decision": "^19.2.0",
67
- "@atlaskit/tmp-editor-statsig": "^13.14.0",
67
+ "@atlaskit/tmp-editor-statsig": "^13.16.0",
68
68
  "@atlaskit/tokens": "^7.0.0",
69
69
  "@atlaskit/tooltip": "^20.6.0",
70
70
  "@atlaskit/width-detector": "^5.0.0",
@@ -450,6 +450,9 @@
450
450
  "platform_editor_toolbar_aifc_patch_7": {
451
451
  "type": "boolean"
452
452
  },
453
+ "confluence-whiteboards-quick-insert-l10n-eligible": {
454
+ "type": "boolean"
455
+ },
453
456
  "platform_editor_table_container_y_overflow_fix": {
454
457
  "type": "boolean"
455
458
  }