@atlaskit/editor-common 106.1.10 → 106.3.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,35 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 106.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#164625](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/164625)
8
+ [`aac10c2d4c08d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aac10c2d4c08d) -
9
+ [ED-26900] Add a new config, getMoreOptionsButtonConfig, to TypeAheadHandler so that it can
10
+ support adding a more option button to typeahead list
11
+ - [#161626](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161626)
12
+ [`a614421730437`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a614421730437) -
13
+ [ux] EDITOR-769: Implement first phase of new AI Palette redesigns for Preview modal behind fg
14
+ platform_editor_new_ai_palette
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
20
+ ## 106.2.0
21
+
22
+ ### Minor Changes
23
+
24
+ - [#164920](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/164920)
25
+ [`bd64fb35bc619`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd64fb35bc619) -
26
+ [https://product-fabric.atlassian.net/browse/ED-28183](ED-28183) - fix a11y issue in editor link
27
+ search
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+
3
33
  ## 106.1.10
4
34
 
5
35
  ### Patch Changes
@@ -38,6 +38,11 @@ var aiConfigItemMessages = exports.aiConfigItemMessages = (0, _reactIntlNext.def
38
38
  defaultMessage: 'Insert below',
39
39
  description: 'Inserts the response below the current location'
40
40
  },
41
+ configActionInsertBelowOriginal: {
42
+ id: 'fabric.editor.ai.config.item.action.insertBelowOriginal',
43
+ defaultMessage: 'Insert below original',
44
+ description: 'Inserts the response below the original content'
45
+ },
41
46
  configActionReplace: {
42
47
  id: 'fabric.editor.ai.config.item.action.replace',
43
48
  defaultMessage: 'Replace',
@@ -58,6 +63,11 @@ var aiConfigItemMessages = exports.aiConfigItemMessages = (0, _reactIntlNext.def
58
63
  defaultMessage: 'Open in Chat',
59
64
  description: 'Tooltip and label for Open in Chat button'
60
65
  },
66
+ configActionContinueChatLabel: {
67
+ id: 'fabric.editor.ai.config.item.action.rovoAgents.contineChatLabel',
68
+ defaultMessage: 'Continue in chat',
69
+ description: 'Tooltip and label for Continue in chat button'
70
+ },
61
71
  configActionEdit: {
62
72
  id: 'fabric.editor.ai.config.item.action.edit',
63
73
  defaultMessage: 'Edit',
@@ -64,7 +64,8 @@ var LinkSearchList = exports.default = /*#__PURE__*/function (_PureComponent) {
64
64
  css: linkSearchList,
65
65
  id: id,
66
66
  role: role,
67
- "aria-controls": ariaControls
67
+ "aria-controls": ariaControls,
68
+ "data-testid": "".concat(id, "--items")
68
69
  }, items.map(function (item, index) {
69
70
  return (0, _react2.jsx)(_LinkSearchListItem.default, {
70
71
  id: "link-search-list-item-".concat(index),
@@ -81,7 +82,8 @@ var LinkSearchList = exports.default = /*#__PURE__*/function (_PureComponent) {
81
82
  }
82
83
  if (isLoading) {
83
84
  loadingContent = (0, _react2.jsx)("div", {
84
- "data-testid": "".concat(id, "-loading"),
85
+ id: id,
86
+ "data-testid": "".concat(id, "--loading"),
85
87
  css: spinnerContainer
86
88
  }, (0, _react2.jsx)(_spinner.default, {
87
89
  size: "medium",
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "106.1.10";
19
+ var packageVersion = "106.3.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "106.1.10";
26
+ var packageVersion = "106.3.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -32,6 +32,11 @@ export const aiConfigItemMessages = defineMessages({
32
32
  defaultMessage: 'Insert below',
33
33
  description: 'Inserts the response below the current location'
34
34
  },
35
+ configActionInsertBelowOriginal: {
36
+ id: 'fabric.editor.ai.config.item.action.insertBelowOriginal',
37
+ defaultMessage: 'Insert below original',
38
+ description: 'Inserts the response below the original content'
39
+ },
35
40
  configActionReplace: {
36
41
  id: 'fabric.editor.ai.config.item.action.replace',
37
42
  defaultMessage: 'Replace',
@@ -52,6 +57,11 @@ export const aiConfigItemMessages = defineMessages({
52
57
  defaultMessage: 'Open in Chat',
53
58
  description: 'Tooltip and label for Open in Chat button'
54
59
  },
60
+ configActionContinueChatLabel: {
61
+ id: 'fabric.editor.ai.config.item.action.rovoAgents.contineChatLabel',
62
+ defaultMessage: 'Continue in chat',
63
+ description: 'Tooltip and label for Continue in chat button'
64
+ },
55
65
  configActionEdit: {
56
66
  id: 'fabric.editor.ai.config.item.action.edit',
57
67
  defaultMessage: 'Edit',
@@ -47,7 +47,8 @@ export default class LinkSearchList extends PureComponent {
47
47
  css: linkSearchList,
48
48
  id: id,
49
49
  role: role,
50
- "aria-controls": ariaControls
50
+ "aria-controls": ariaControls,
51
+ "data-testid": `${id}--items`
51
52
  }, items.map((item, index) => jsx(LinkSearchListItem, {
52
53
  id: `link-search-list-item-${index}`,
53
54
  role: role && 'option',
@@ -62,7 +63,8 @@ export default class LinkSearchList extends PureComponent {
62
63
  }
63
64
  if (isLoading) {
64
65
  loadingContent = jsx("div", {
65
- "data-testid": `${id}-loading`,
66
+ id: id,
67
+ "data-testid": `${id}--loading`,
66
68
  css: spinnerContainer
67
69
  }, jsx(Spinner, {
68
70
  size: "medium",
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "106.1.10";
4
+ const packageVersion = "106.3.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "106.1.10";
16
+ const packageVersion = "106.3.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -32,6 +32,11 @@ export var aiConfigItemMessages = defineMessages({
32
32
  defaultMessage: 'Insert below',
33
33
  description: 'Inserts the response below the current location'
34
34
  },
35
+ configActionInsertBelowOriginal: {
36
+ id: 'fabric.editor.ai.config.item.action.insertBelowOriginal',
37
+ defaultMessage: 'Insert below original',
38
+ description: 'Inserts the response below the original content'
39
+ },
35
40
  configActionReplace: {
36
41
  id: 'fabric.editor.ai.config.item.action.replace',
37
42
  defaultMessage: 'Replace',
@@ -52,6 +57,11 @@ export var aiConfigItemMessages = defineMessages({
52
57
  defaultMessage: 'Open in Chat',
53
58
  description: 'Tooltip and label for Open in Chat button'
54
59
  },
60
+ configActionContinueChatLabel: {
61
+ id: 'fabric.editor.ai.config.item.action.rovoAgents.contineChatLabel',
62
+ defaultMessage: 'Continue in chat',
63
+ description: 'Tooltip and label for Continue in chat button'
64
+ },
55
65
  configActionEdit: {
56
66
  id: 'fabric.editor.ai.config.item.action.edit',
57
67
  defaultMessage: 'Edit',
@@ -60,7 +60,8 @@ var LinkSearchList = /*#__PURE__*/function (_PureComponent) {
60
60
  css: linkSearchList,
61
61
  id: id,
62
62
  role: role,
63
- "aria-controls": ariaControls
63
+ "aria-controls": ariaControls,
64
+ "data-testid": "".concat(id, "--items")
64
65
  }, items.map(function (item, index) {
65
66
  return jsx(LinkSearchListItem, {
66
67
  id: "link-search-list-item-".concat(index),
@@ -77,7 +78,8 @@ var LinkSearchList = /*#__PURE__*/function (_PureComponent) {
77
78
  }
78
79
  if (isLoading) {
79
80
  loadingContent = jsx("div", {
80
- "data-testid": "".concat(id, "-loading"),
81
+ id: id,
82
+ "data-testid": "".concat(id, "--loading"),
81
83
  css: spinnerContainer
82
84
  }, jsx(Spinner, {
83
85
  size: "medium",
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "106.1.10";
10
+ var packageVersion = "106.3.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "106.1.10";
23
+ var packageVersion = "106.3.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -29,6 +29,11 @@ export declare const aiConfigItemMessages: {
29
29
  defaultMessage: string;
30
30
  description: string;
31
31
  };
32
+ configActionInsertBelowOriginal: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
32
37
  configActionReplace: {
33
38
  id: string;
34
39
  defaultMessage: string;
@@ -49,6 +54,11 @@ export declare const aiConfigItemMessages: {
49
54
  defaultMessage: string;
50
55
  description: string;
51
56
  };
57
+ configActionContinueChatLabel: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
52
62
  configActionEdit: {
53
63
  id: string;
54
64
  defaultMessage: string;
@@ -1,8 +1,10 @@
1
- import type { ReactElement } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import { IntlShape } from 'react-intl-next';
2
3
  import { type Fragment, type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
4
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
5
  import type { TypeAheadPayload } from '../analytics/types/type-ahead';
5
6
  import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
7
+ import type { EditorCommand } from '../types';
6
8
  type TypeAheadForceSelectProps = {
7
9
  query: string;
8
10
  items: Array<TypeAheadItem>;
@@ -41,6 +43,12 @@ export type TypeAheadItem = {
41
43
  [key: string]: any;
42
44
  };
43
45
  export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
46
+ export type MoreOptionsButtonConfig = {
47
+ title: string;
48
+ ariaLabel?: string;
49
+ onClick: EditorCommand;
50
+ iconBefore?: ReactNode;
51
+ };
44
52
  export type TypeAheadHandler = {
45
53
  id: TypeAheadAvailableNodes;
46
54
  /** Pattern that will trigger the TypeAhead */
@@ -69,5 +77,6 @@ export type TypeAheadHandler = {
69
77
  wasItemInserted?: boolean;
70
78
  }) => void;
71
79
  getHighlight?: (state: EditorState) => JSX.Element | null;
80
+ getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
72
81
  };
73
82
  export {};
@@ -29,6 +29,11 @@ export declare const aiConfigItemMessages: {
29
29
  defaultMessage: string;
30
30
  description: string;
31
31
  };
32
+ configActionInsertBelowOriginal: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
32
37
  configActionReplace: {
33
38
  id: string;
34
39
  defaultMessage: string;
@@ -49,6 +54,11 @@ export declare const aiConfigItemMessages: {
49
54
  defaultMessage: string;
50
55
  description: string;
51
56
  };
57
+ configActionContinueChatLabel: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
52
62
  configActionEdit: {
53
63
  id: string;
54
64
  defaultMessage: string;
@@ -1,8 +1,10 @@
1
- import type { ReactElement } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import { IntlShape } from 'react-intl-next';
2
3
  import { type Fragment, type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
4
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
5
  import type { TypeAheadPayload } from '../analytics/types/type-ahead';
5
6
  import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
7
+ import type { EditorCommand } from '../types';
6
8
  type TypeAheadForceSelectProps = {
7
9
  query: string;
8
10
  items: Array<TypeAheadItem>;
@@ -41,6 +43,12 @@ export type TypeAheadItem = {
41
43
  [key: string]: any;
42
44
  };
43
45
  export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
46
+ export type MoreOptionsButtonConfig = {
47
+ title: string;
48
+ ariaLabel?: string;
49
+ onClick: EditorCommand;
50
+ iconBefore?: ReactNode;
51
+ };
44
52
  export type TypeAheadHandler = {
45
53
  id: TypeAheadAvailableNodes;
46
54
  /** Pattern that will trigger the TypeAhead */
@@ -69,5 +77,6 @@ export type TypeAheadHandler = {
69
77
  wasItemInserted?: boolean;
70
78
  }) => void;
71
79
  getHighlight?: (state: EditorState) => JSX.Element | null;
80
+ getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
72
81
  };
73
82
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "106.1.10",
3
+ "version": "106.3.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -139,7 +139,7 @@
139
139
  "@atlaskit/editor-prosemirror": "7.0.0",
140
140
  "@atlaskit/editor-shared-styles": "^3.4.0",
141
141
  "@atlaskit/editor-tables": "^2.9.0",
142
- "@atlaskit/emoji": "^69.2.0",
142
+ "@atlaskit/emoji": "^69.3.0",
143
143
  "@atlaskit/icon": "^26.4.0",
144
144
  "@atlaskit/icon-object": "^7.1.0",
145
145
  "@atlaskit/link": "^3.2.0",
@@ -163,13 +163,13 @@
163
163
  "@atlaskit/profilecard": "^23.16.0",
164
164
  "@atlaskit/react-ufo": "^3.13.0",
165
165
  "@atlaskit/section-message": "^8.2.0",
166
- "@atlaskit/smart-card": "^38.6.0",
166
+ "@atlaskit/smart-card": "^38.7.0",
167
167
  "@atlaskit/smart-user-picker": "^8.0.0",
168
168
  "@atlaskit/spinner": "^18.0.0",
169
169
  "@atlaskit/task-decision": "^19.2.0",
170
170
  "@atlaskit/textfield": "^8.0.0",
171
171
  "@atlaskit/theme": "^18.0.0",
172
- "@atlaskit/tmp-editor-statsig": "^5.11.0",
172
+ "@atlaskit/tmp-editor-statsig": "^5.13.0",
173
173
  "@atlaskit/tokens": "^5.0.0",
174
174
  "@atlaskit/tooltip": "^20.3.0",
175
175
  "@atlaskit/width-detector": "^5.0.0",