@atlaskit/editor-core 215.14.0 → 215.14.2

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,21 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 215.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a7126919f479c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a7126919f479c) -
8
+ enable priority in editor typeahead for rovo chat skills enabled apps
9
+ - Updated dependencies
10
+
11
+ ## 215.14.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`fd7ef4c47aee1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fd7ef4c47aee1) -
16
+ Add EditorSessionID to Sentry Error payload for EditorCore ErrorBoundary
17
+ - Updated dependencies
18
+
3
19
  ## 215.14.0
4
20
 
5
21
  ### Minor Changes
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.ErrorBoundaryWithEditorView = void 0;
7
+ exports.default = exports.ErrorBoundaryWithEditorViewWithAnalyticsReactContext = exports.ErrorBoundaryWithEditorView = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -15,12 +15,17 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
  var _uuid = _interopRequireDefault(require("uuid"));
18
+ var _analyticsNextStableReactContext = _interopRequireDefault(require("@atlaskit/analytics-next-stable-react-context"));
18
19
  var _analytics = require("@atlaskit/editor-common/analytics");
19
20
  var _coreUtils = require("@atlaskit/editor-common/core-utils");
20
21
  var _intlErrorBoundary = require("@atlaskit/editor-common/intl-error-boundary");
21
22
  var _monitoring = require("@atlaskit/editor-common/monitoring");
23
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
22
25
  var _outdatedBrowsers = require("../utils/outdatedBrowsers");
23
26
  var _WithEditorView = require("./WithEditorView");
27
+ 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; }
28
+ 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; }
24
29
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
25
30
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
26
31
  // Ignored via go/ees005
@@ -74,7 +79,7 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
74
79
  errorId: sharedId
75
80
  }
76
81
  });
77
- (0, _monitoring.logException)(error, {
82
+ _this.logException(error, {
78
83
  location: 'editor-core/create-editor',
79
84
  product: product
80
85
  });
@@ -119,6 +124,9 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
119
124
  var _this$props$createAna, _this$props;
120
125
  (_this$props$createAna = (_this$props = _this.props).createAnalyticsEvent) === null || _this$props$createAna === void 0 || _this$props$createAna.call(_this$props, event).fire(_analytics.editorAnalyticsChannel);
121
126
  });
127
+ (0, _defineProperty2.default)(_this, "logException", function (error, tags) {
128
+ (0, _monitoring.logException)(error, tags);
129
+ });
122
130
  _this.featureFlags = props.featureFlags;
123
131
  return _this;
124
132
  }
@@ -181,4 +189,23 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
181
189
  rethrow: true,
182
190
  errorTracking: true
183
191
  });
184
- var _default = exports.default = (0, _WithEditorView.WithEditorView)(ErrorBoundaryWithEditorView);
192
+ var ErrorBoundaryWithEditorViewWithAnalyticsReactContext = exports.ErrorBoundaryWithEditorViewWithAnalyticsReactContext = /*#__PURE__*/function (_ErrorBoundaryWithEdi) {
193
+ function ErrorBoundaryWithEditorViewWithAnalyticsReactContext(props) {
194
+ var _this3;
195
+ (0, _classCallCheck2.default)(this, ErrorBoundaryWithEditorViewWithAnalyticsReactContext);
196
+ _this3 = _callSuper(this, ErrorBoundaryWithEditorViewWithAnalyticsReactContext, [props]);
197
+ (0, _defineProperty2.default)(_this3, "logException", function (error, tags) {
198
+ var _this3$context;
199
+ var extraTags = {};
200
+ extraTags.editorSessionId = (_this3$context = _this3.context) === null || _this3$context === void 0 || (_this3$context = _this3$context.getAtlaskitAnalyticsContext()) === null || _this3$context === void 0 || (_this3$context = _this3$context[0]) === null || _this3$context === void 0 || (_this3$context = _this3$context.fabricEditorCtx) === null || _this3$context === void 0 ? void 0 : _this3$context.editorSessionId;
201
+ (0, _monitoring.logException)(error, _objectSpread(_objectSpread({}, tags), extraTags));
202
+ });
203
+ return _this3;
204
+ }
205
+ (0, _inherits2.default)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, _ErrorBoundaryWithEdi);
206
+ return (0, _createClass2.default)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext);
207
+ }(ErrorBoundaryWithEditorView);
208
+ (0, _defineProperty2.default)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, "contextType", _analyticsNextStableReactContext.default);
209
+ var _default = exports.default = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
210
+ return (0, _platformFeatureFlags.fg)('platform_editor_sentry_breadcrumbs');
211
+ }, (0, _WithEditorView.WithEditorView)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), (0, _WithEditorView.WithEditorView)(ErrorBoundaryWithEditorView));
@@ -108,7 +108,7 @@ function _extensionProviderToQuickInsertProvider() {
108
108
  },
109
109
  keywords: item.keywords,
110
110
  featured: item.featured
111
- }, (0, _platformFeatureFlags.fg)('cc_fd_wb_create_priority_in_slash_menu_enabled') && {
111
+ }, ((0, _platformFeatureFlags.fg)('cc_fd_wb_create_priority_in_slash_menu_enabled') || (0, _platformFeatureFlags.fg)('rovo_chat_enable_skills_ui_m1')) && {
112
112
  priority: item.priority
113
113
  }), {}, {
114
114
  categories: item.categories,
@@ -1,12 +1,14 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
-
4
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
5
4
  import uuid from 'uuid';
5
+ import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
6
6
  import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
7
7
  import { getDocStructure } from '@atlaskit/editor-common/core-utils';
8
8
  import { IntlErrorBoundary } from '@atlaskit/editor-common/intl-error-boundary';
9
9
  import { logException } from '@atlaskit/editor-common/monitoring';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
10
12
  import { isOutdatedBrowser } from '../utils/outdatedBrowsers';
11
13
  import { WithEditorView } from './WithEditorView';
12
14
  // Ignored via go/ees005
@@ -54,7 +56,7 @@ export class ErrorBoundaryWithEditorView extends React.Component {
54
56
  errorId: sharedId
55
57
  }
56
58
  });
57
- logException(error, {
59
+ this.logException(error, {
58
60
  location: 'editor-core/create-editor',
59
61
  product
60
62
  });
@@ -75,6 +77,9 @@ export class ErrorBoundaryWithEditorView extends React.Component {
75
77
  var _this$props$createAna, _this$props;
76
78
  (_this$props$createAna = (_this$props = this.props).createAnalyticsEvent) === null || _this$props$createAna === void 0 ? void 0 : _this$props$createAna.call(_this$props, event).fire(editorAnalyticsChannel);
77
79
  });
80
+ _defineProperty(this, "logException", (error, tags) => {
81
+ logException(error, tags);
82
+ });
78
83
  this.featureFlags = props.featureFlags;
79
84
  }
80
85
  componentDidCatch(error, errorInfo) {
@@ -130,4 +135,19 @@ _defineProperty(ErrorBoundaryWithEditorView, "defaultProps", {
130
135
  rethrow: true,
131
136
  errorTracking: true
132
137
  });
133
- export default WithEditorView(ErrorBoundaryWithEditorView);
138
+ export class ErrorBoundaryWithEditorViewWithAnalyticsReactContext extends ErrorBoundaryWithEditorView {
139
+ constructor(props) {
140
+ super(props);
141
+ _defineProperty(this, "logException", (error, tags) => {
142
+ var _this$context, _this$context$getAtla, _this$context$getAtla2, _this$context$getAtla3;
143
+ const extraTags = {};
144
+ extraTags.editorSessionId = (_this$context = this.context) === null || _this$context === void 0 ? void 0 : (_this$context$getAtla = _this$context.getAtlaskitAnalyticsContext()) === null || _this$context$getAtla === void 0 ? void 0 : (_this$context$getAtla2 = _this$context$getAtla[0]) === null || _this$context$getAtla2 === void 0 ? void 0 : (_this$context$getAtla3 = _this$context$getAtla2.fabricEditorCtx) === null || _this$context$getAtla3 === void 0 ? void 0 : _this$context$getAtla3.editorSessionId;
145
+ logException(error, {
146
+ ...tags,
147
+ ...extraTags
148
+ });
149
+ });
150
+ }
151
+ }
152
+ _defineProperty(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, "contextType", AnalyticsReactContext);
153
+ export default componentWithCondition(() => fg('platform_editor_sentry_breadcrumbs'), WithEditorView(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), WithEditorView(ErrorBoundaryWithEditorView));
@@ -72,7 +72,7 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
72
72
  }),
73
73
  keywords: item.keywords,
74
74
  featured: item.featured,
75
- ...(fg('cc_fd_wb_create_priority_in_slash_menu_enabled') && {
75
+ ...((fg('cc_fd_wb_create_priority_in_slash_menu_enabled') || fg('rovo_chat_enable_skills_ui_m1')) && {
76
76
  priority: item.priority
77
77
  }),
78
78
  categories: item.categories,
@@ -5,17 +5,21 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
6
  import _inherits from "@babel/runtime/helpers/inherits";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ 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; }
9
+ 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) { _defineProperty(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; }
8
10
  import _regeneratorRuntime from "@babel/runtime/regenerator";
9
11
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
13
  import React from 'react';
12
-
13
14
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
14
15
  import uuid from 'uuid';
16
+ import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
15
17
  import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
16
18
  import { getDocStructure } from '@atlaskit/editor-common/core-utils';
17
19
  import { IntlErrorBoundary } from '@atlaskit/editor-common/intl-error-boundary';
18
20
  import { logException } from '@atlaskit/editor-common/monitoring';
21
+ import { fg } from '@atlaskit/platform-feature-flags';
22
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
19
23
  import { isOutdatedBrowser } from '../utils/outdatedBrowsers';
20
24
  import { WithEditorView } from './WithEditorView';
21
25
  // Ignored via go/ees005
@@ -69,7 +73,7 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
69
73
  errorId: sharedId
70
74
  }
71
75
  });
72
- logException(error, {
76
+ _this.logException(error, {
73
77
  location: 'editor-core/create-editor',
74
78
  product: product
75
79
  });
@@ -114,6 +118,9 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
114
118
  var _this$props$createAna, _this$props;
115
119
  (_this$props$createAna = (_this$props = _this.props).createAnalyticsEvent) === null || _this$props$createAna === void 0 || _this$props$createAna.call(_this$props, event).fire(editorAnalyticsChannel);
116
120
  });
121
+ _defineProperty(_this, "logException", function (error, tags) {
122
+ logException(error, tags);
123
+ });
117
124
  _this.featureFlags = props.featureFlags;
118
125
  return _this;
119
126
  }
@@ -176,4 +183,23 @@ _defineProperty(ErrorBoundaryWithEditorView, "defaultProps", {
176
183
  rethrow: true,
177
184
  errorTracking: true
178
185
  });
179
- export default WithEditorView(ErrorBoundaryWithEditorView);
186
+ export var ErrorBoundaryWithEditorViewWithAnalyticsReactContext = /*#__PURE__*/function (_ErrorBoundaryWithEdi) {
187
+ function ErrorBoundaryWithEditorViewWithAnalyticsReactContext(props) {
188
+ var _this3;
189
+ _classCallCheck(this, ErrorBoundaryWithEditorViewWithAnalyticsReactContext);
190
+ _this3 = _callSuper(this, ErrorBoundaryWithEditorViewWithAnalyticsReactContext, [props]);
191
+ _defineProperty(_this3, "logException", function (error, tags) {
192
+ var _this3$context;
193
+ var extraTags = {};
194
+ extraTags.editorSessionId = (_this3$context = _this3.context) === null || _this3$context === void 0 || (_this3$context = _this3$context.getAtlaskitAnalyticsContext()) === null || _this3$context === void 0 || (_this3$context = _this3$context[0]) === null || _this3$context === void 0 || (_this3$context = _this3$context.fabricEditorCtx) === null || _this3$context === void 0 ? void 0 : _this3$context.editorSessionId;
195
+ logException(error, _objectSpread(_objectSpread({}, tags), extraTags));
196
+ });
197
+ return _this3;
198
+ }
199
+ _inherits(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, _ErrorBoundaryWithEdi);
200
+ return _createClass(ErrorBoundaryWithEditorViewWithAnalyticsReactContext);
201
+ }(ErrorBoundaryWithEditorView);
202
+ _defineProperty(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, "contextType", AnalyticsReactContext);
203
+ export default componentWithCondition(function () {
204
+ return fg('platform_editor_sentry_breadcrumbs');
205
+ }, WithEditorView(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), WithEditorView(ErrorBoundaryWithEditorView));
@@ -102,7 +102,7 @@ function _extensionProviderToQuickInsertProvider() {
102
102
  },
103
103
  keywords: item.keywords,
104
104
  featured: item.featured
105
- }, fg('cc_fd_wb_create_priority_in_slash_menu_enabled') && {
105
+ }, (fg('cc_fd_wb_create_priority_in_slash_menu_enabled') || fg('rovo_chat_enable_skills_ui_m1')) && {
106
106
  priority: item.priority
107
107
  }), {}, {
108
108
  categories: item.categories,
@@ -1,4 +1,6 @@
1
1
  import React, { type ErrorInfo } from 'react';
2
+ import type { Primitive } from '@sentry/types';
3
+ import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
2
4
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
5
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
4
6
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
@@ -30,8 +32,21 @@ export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBo
30
32
  private sendErrorData;
31
33
  private getProductName;
32
34
  private fireAnalyticsEvent;
35
+ protected logException: (error: Error, tags?: {
36
+ [key: string]: Primitive;
37
+ }) => void;
33
38
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
34
39
  render(): React.JSX.Element;
35
40
  }
36
- declare const _default: (props: React.PropsWithChildren<Omit<ErrorBoundaryProps, "editorView">>) => React.JSX.Element;
41
+ export declare class ErrorBoundaryWithEditorViewWithAnalyticsReactContext extends ErrorBoundaryWithEditorView {
42
+ static contextType: React.Context<import("@atlaskit/analytics-next-stable-react-context").AnalyticsReactContextInterface>;
43
+ context: React.ContextType<typeof AnalyticsReactContext>;
44
+ constructor(props: ErrorBoundaryProps);
45
+ protected logException: (error: Error, tags?: {
46
+ [key: string]: Primitive;
47
+ }) => void;
48
+ }
49
+ declare const _default: React.FC<Omit<ErrorBoundaryProps, "editorView"> & {
50
+ children?: React.ReactNode | undefined;
51
+ }>;
37
52
  export default _default;
@@ -1,4 +1,6 @@
1
1
  import React, { type ErrorInfo } from 'react';
2
+ import type { Primitive } from '@sentry/types';
3
+ import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
2
4
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
5
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
4
6
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
@@ -30,8 +32,21 @@ export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBo
30
32
  private sendErrorData;
31
33
  private getProductName;
32
34
  private fireAnalyticsEvent;
35
+ protected logException: (error: Error, tags?: {
36
+ [key: string]: Primitive;
37
+ }) => void;
33
38
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
34
39
  render(): React.JSX.Element;
35
40
  }
36
- declare const _default: (props: React.PropsWithChildren<Omit<ErrorBoundaryProps, "editorView">>) => React.JSX.Element;
41
+ export declare class ErrorBoundaryWithEditorViewWithAnalyticsReactContext extends ErrorBoundaryWithEditorView {
42
+ static contextType: React.Context<import("@atlaskit/analytics-next-stable-react-context").AnalyticsReactContextInterface>;
43
+ context: React.ContextType<typeof AnalyticsReactContext>;
44
+ constructor(props: ErrorBoundaryProps);
45
+ protected logException: (error: Error, tags?: {
46
+ [key: string]: Primitive;
47
+ }) => void;
48
+ }
49
+ declare const _default: React.FC<Omit<ErrorBoundaryProps, "editorView"> & {
50
+ children?: React.ReactNode | undefined;
51
+ }>;
37
52
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "215.14.0",
3
+ "version": "215.14.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -348,6 +348,9 @@
348
348
  "type": "boolean",
349
349
  "referenceOnly": true
350
350
  },
351
+ "platform_editor_sentry_breadcrumbs": {
352
+ "type": "boolean"
353
+ },
351
354
  "platform_editor_blocktaskitem_patch_2": {
352
355
  "type": "boolean",
353
356
  "referenceOnly": true
@@ -386,6 +389,9 @@
386
389
  },
387
390
  "platform_editor_toolbar_aifc_responsive_improve": {
388
391
  "type": "boolean"
392
+ },
393
+ "rovo_chat_enable_skills_ui_m1": {
394
+ "type": "boolean"
389
395
  }
390
396
  },
391
397
  "stricter": {