@atlaskit/editor-common 106.2.0 → 106.3.1
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 +25 -0
- package/dist/cjs/ai-messages/ai-config-items.js +10 -0
- package/dist/cjs/media-single/ExternalImageBadge.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/Dropdown/index.js +11 -0
- package/dist/es2019/ai-messages/ai-config-items.js +10 -0
- package/dist/es2019/media-single/ExternalImageBadge.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/Dropdown/index.js +9 -0
- package/dist/esm/ai-messages/ai-config-items.js +10 -0
- package/dist/esm/media-single/ExternalImageBadge.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/Dropdown/index.js +11 -0
- package/dist/types/ai-messages/ai-config-items.d.ts +10 -0
- package/dist/types/types/type-ahead.d.ts +10 -1
- package/dist/types/ui-menu/Dropdown/index.d.ts +1 -0
- package/dist/types-ts4.5/ai-messages/ai-config-items.d.ts +10 -0
- package/dist/types-ts4.5/types/type-ahead.d.ts +10 -1
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +1 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 106.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#166430](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166430)
|
|
8
|
+
[`cbdfbbb359bd9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cbdfbbb359bd9) -
|
|
9
|
+
[ux] ED-27214 Fix flickering when dropdown menu opens in floating toolbar
|
|
10
|
+
|
|
11
|
+
## 106.3.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#164625](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/164625)
|
|
16
|
+
[`aac10c2d4c08d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aac10c2d4c08d) -
|
|
17
|
+
[ED-26900] Add a new config, getMoreOptionsButtonConfig, to TypeAheadHandler so that it can
|
|
18
|
+
support adding a more option button to typeahead list
|
|
19
|
+
- [#161626](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161626)
|
|
20
|
+
[`a614421730437`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a614421730437) -
|
|
21
|
+
[ux] EDITOR-769: Implement first phase of new AI Palette redesigns for Preview modal behind fg
|
|
22
|
+
platform_editor_new_ai_palette
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 106.2.0
|
|
4
29
|
|
|
5
30
|
### Minor 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',
|
|
@@ -18,7 +18,7 @@ var baseStyles = (0, _primitives.xcss)({
|
|
|
18
18
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
19
19
|
cursor: 'pointer'
|
|
20
20
|
});
|
|
21
|
-
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
21
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com'];
|
|
22
22
|
var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
23
23
|
if (!url) {
|
|
24
24
|
return false;
|
|
@@ -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.
|
|
19
|
+
var packageVersion = "106.3.1";
|
|
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.
|
|
26
|
+
var packageVersion = "106.3.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -18,6 +18,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
18
18
|
var _uiReact = require("../../ui-react");
|
|
19
19
|
var _DropList = _interopRequireDefault(require("../../ui/DropList"));
|
|
20
20
|
var _Popup = _interopRequireDefault(require("../../ui/Popup"));
|
|
21
|
+
var _utils = require("../../ui/Popup/utils");
|
|
21
22
|
var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
|
|
22
23
|
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); }
|
|
23
24
|
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)); }
|
|
@@ -68,6 +69,16 @@ var Dropdown = exports.Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
68
69
|
}
|
|
69
70
|
(0, _inherits2.default)(Dropdown, _PureComponent);
|
|
70
71
|
return (0, _createClass2.default)(Dropdown, [{
|
|
72
|
+
key: "componentDidUpdate",
|
|
73
|
+
value: function componentDidUpdate(prevProps) {
|
|
74
|
+
if (!prevProps.isOpen && this.props.isOpen && this.state.target && (0, _platformFeatureFlags.fg)('platform_editor_floating_toolbar_dropdown_flicker')) {
|
|
75
|
+
var initialPlacement = (0, _utils.calculatePlacement)(this.state.target, this.props.boundariesElement || document.body, this.props.fitWidth, this.props.fitHeight, this.props.alignX, this.props.alignY, this.props.forcePlacement);
|
|
76
|
+
this.setState({
|
|
77
|
+
popupPlacement: initialPlacement
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
71
82
|
key: "renderDropdown",
|
|
72
83
|
value: function renderDropdown() {
|
|
73
84
|
var _this$state = this.state,
|
|
@@ -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',
|
|
@@ -11,7 +11,7 @@ const baseStyles = xcss({
|
|
|
11
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
12
12
|
cursor: 'pointer'
|
|
13
13
|
});
|
|
14
|
-
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
14
|
+
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com'];
|
|
15
15
|
export const isUnbadgedUrl = url => {
|
|
16
16
|
if (!url) {
|
|
17
17
|
return false;
|
|
@@ -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.
|
|
4
|
+
const packageVersion = "106.3.1";
|
|
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.
|
|
16
|
+
const packageVersion = "106.3.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -5,6 +5,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
5
5
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
6
6
|
import DropdownList from '../../ui/DropList';
|
|
7
7
|
import Popup from '../../ui/Popup';
|
|
8
|
+
import { calculatePlacement } from '../../ui/Popup/utils';
|
|
8
9
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
9
10
|
/**
|
|
10
11
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -45,6 +46,14 @@ export class Dropdown extends PureComponent {
|
|
|
45
46
|
popupPlacement: ['bottom', 'left']
|
|
46
47
|
};
|
|
47
48
|
}
|
|
49
|
+
componentDidUpdate(prevProps) {
|
|
50
|
+
if (!prevProps.isOpen && this.props.isOpen && this.state.target && fg('platform_editor_floating_toolbar_dropdown_flicker')) {
|
|
51
|
+
const initialPlacement = calculatePlacement(this.state.target, this.props.boundariesElement || document.body, this.props.fitWidth, this.props.fitHeight, this.props.alignX, this.props.alignY, this.props.forcePlacement);
|
|
52
|
+
this.setState({
|
|
53
|
+
popupPlacement: initialPlacement
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
48
57
|
renderDropdown() {
|
|
49
58
|
const {
|
|
50
59
|
target,
|
|
@@ -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',
|
|
@@ -11,7 +11,7 @@ var baseStyles = xcss({
|
|
|
11
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
12
12
|
cursor: 'pointer'
|
|
13
13
|
});
|
|
14
|
-
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
14
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com'];
|
|
15
15
|
export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
16
16
|
if (!url) {
|
|
17
17
|
return false;
|
|
@@ -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.
|
|
10
|
+
var packageVersion = "106.3.1";
|
|
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.
|
|
23
|
+
var packageVersion = "106.3.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -12,6 +12,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
12
12
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
13
13
|
import DropdownList from '../../ui/DropList';
|
|
14
14
|
import Popup from '../../ui/Popup';
|
|
15
|
+
import { calculatePlacement } from '../../ui/Popup/utils';
|
|
15
16
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
16
17
|
/**
|
|
17
18
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -59,6 +60,16 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
59
60
|
}
|
|
60
61
|
_inherits(Dropdown, _PureComponent);
|
|
61
62
|
return _createClass(Dropdown, [{
|
|
63
|
+
key: "componentDidUpdate",
|
|
64
|
+
value: function componentDidUpdate(prevProps) {
|
|
65
|
+
if (!prevProps.isOpen && this.props.isOpen && this.state.target && fg('platform_editor_floating_toolbar_dropdown_flicker')) {
|
|
66
|
+
var initialPlacement = calculatePlacement(this.state.target, this.props.boundariesElement || document.body, this.props.fitWidth, this.props.fitHeight, this.props.alignX, this.props.alignY, this.props.forcePlacement);
|
|
67
|
+
this.setState({
|
|
68
|
+
popupPlacement: initialPlacement
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
62
73
|
key: "renderDropdown",
|
|
63
74
|
value: function renderDropdown() {
|
|
64
75
|
var _this$state = this.state,
|
|
@@ -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 {};
|
|
@@ -39,6 +39,7 @@ export declare class Dropdown extends PureComponent<Props, State> {
|
|
|
39
39
|
private updatePopupPlacement;
|
|
40
40
|
private handleCloseAndFocus;
|
|
41
41
|
private handleClose;
|
|
42
|
+
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
42
43
|
private renderDropdown;
|
|
43
44
|
render(): React.JSX.Element;
|
|
44
45
|
}
|
|
@@ -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 {};
|
|
@@ -45,6 +45,7 @@ export declare class Dropdown extends PureComponent<Props, State> {
|
|
|
45
45
|
private updatePopupPlacement;
|
|
46
46
|
private handleCloseAndFocus;
|
|
47
47
|
private handleClose;
|
|
48
|
+
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
48
49
|
private renderDropdown;
|
|
49
50
|
render(): React.JSX.Element;
|
|
50
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "106.
|
|
3
|
+
"version": "106.3.1",
|
|
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/"
|
|
@@ -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.
|
|
166
|
+
"@atlaskit/smart-card": "^38.8.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.
|
|
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",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"devDependencies": {
|
|
210
210
|
"@af/visual-regression": "workspace:^",
|
|
211
211
|
"@atlaskit/media-core": "^36.1.0",
|
|
212
|
-
"@atlaskit/media-test-helpers": "^36.
|
|
212
|
+
"@atlaskit/media-test-helpers": "^36.1.0",
|
|
213
213
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
214
214
|
"@atlaskit/visual-regression": "workspace:^",
|
|
215
215
|
"@testing-library/dom": "^10.1.0",
|
|
@@ -391,6 +391,9 @@
|
|
|
391
391
|
"dst-a11y__replace-anchor-with-link__editor": {
|
|
392
392
|
"type": "boolean"
|
|
393
393
|
},
|
|
394
|
+
"platform_editor_floating_toolbar_dropdown_flicker": {
|
|
395
|
+
"type": "boolean"
|
|
396
|
+
},
|
|
394
397
|
"confluence_preload_forge_viewport_heights_editor": {
|
|
395
398
|
"type": "boolean"
|
|
396
399
|
},
|