@atlaskit/editor-common 94.13.1 → 94.14.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 +15 -0
- package/dist/cjs/analytics/types/ai-definitions-events.js +5 -0
- package/dist/cjs/analytics/types/enums.js +3 -0
- package/dist/cjs/extensibility/ExtensionComponent.js +1 -1
- package/dist/cjs/link/LinkSearch/index.js +2 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/provider-factory/with-providers.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Layer/index.js +2 -2
- package/dist/cjs/ui/Mention/index.js +1 -1
- package/dist/cjs/ui/Mention/mention-with-providers.js +1 -1
- package/dist/cjs/ui/Popup/index.js +2 -2
- package/dist/cjs/utils/imageLoader.js +1 -1
- package/dist/cjs/utils/withFeatureFlaggedComponent.js +1 -1
- package/dist/cjs/with-plugin-state/index.js +1 -1
- package/dist/es2019/analytics/types/ai-definitions-events.js +1 -0
- package/dist/es2019/analytics/types/enums.js +3 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +1 -1
- package/dist/es2019/link/LinkSearch/index.js +2 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/provider-factory/with-providers.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Layer/index.js +2 -2
- package/dist/es2019/ui/Mention/index.js +1 -1
- package/dist/es2019/ui/Mention/mention-with-providers.js +1 -1
- package/dist/es2019/ui/Popup/index.js +2 -2
- package/dist/es2019/utils/imageLoader.js +1 -1
- package/dist/es2019/utils/withFeatureFlaggedComponent.js +1 -1
- package/dist/es2019/with-plugin-state/index.js +1 -1
- package/dist/esm/analytics/types/ai-definitions-events.js +1 -0
- package/dist/esm/analytics/types/enums.js +3 -0
- package/dist/esm/extensibility/ExtensionComponent.js +1 -1
- package/dist/esm/link/LinkSearch/index.js +2 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/provider-factory/with-providers.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Layer/index.js +2 -2
- package/dist/esm/ui/Mention/index.js +1 -1
- package/dist/esm/ui/Mention/mention-with-providers.js +1 -1
- package/dist/esm/ui/Popup/index.js +2 -2
- package/dist/esm/utils/imageLoader.js +1 -1
- package/dist/esm/utils/withFeatureFlaggedComponent.js +1 -1
- package/dist/esm/with-plugin-state/index.js +1 -1
- package/dist/types/analytics/types/ai-definitions-events.d.ts +9 -0
- package/dist/types/analytics/types/enums.d.ts +4 -1
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/utils/withFeatureFlaggedComponent.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/ai-definitions-events.d.ts +9 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +4 -1
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/utils/withFeatureFlaggedComponent.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 94.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 94.14.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#160752](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/160752)
|
|
14
|
+
[`d86736afc929e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d86736afc929e) -
|
|
15
|
+
EDF-1887: Add UI analytics tracking for button and highlight clicks and tie Editor and Definition
|
|
16
|
+
Modal events with common readingAidsSessionId
|
|
17
|
+
|
|
3
18
|
## 94.13.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -266,10 +266,13 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
266
266
|
ACTION_SUBJECT["INLINE_DIALOG"] = "inlineDialog";
|
|
267
267
|
ACTION_SUBJECT["ENGAGEMENT_PLATFORM"] = "engagementPlatform";
|
|
268
268
|
ACTION_SUBJECT["MEDIA_VIEWER"] = "mediaViewer";
|
|
269
|
+
ACTION_SUBJECT["DECORATION"] = "decoration";
|
|
269
270
|
return ACTION_SUBJECT;
|
|
270
271
|
}({});
|
|
271
272
|
var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
272
273
|
ACTION_SUBJECT_ID["ACTION"] = "action";
|
|
274
|
+
ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
|
|
275
|
+
ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
|
|
273
276
|
ACTION_SUBJECT_ID["ALL"] = "all";
|
|
274
277
|
ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
|
|
275
278
|
ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
|
|
@@ -524,7 +524,7 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
|
|
|
524
524
|
return ExtensionComponentInner;
|
|
525
525
|
}(_react.Component);
|
|
526
526
|
var ExtensionComponent = exports.ExtensionComponent = function ExtensionComponent(props) {
|
|
527
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
527
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_extension_component_v2')) {
|
|
528
528
|
return /*#__PURE__*/_react.default.createElement(ExtensionComponentNew, props);
|
|
529
529
|
}
|
|
530
530
|
return /*#__PURE__*/_react.default.createElement(ExtensionComponentOld, props);
|
|
@@ -203,7 +203,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
|
|
|
203
203
|
(0, _createClass2.default)(RecentLink, [{
|
|
204
204
|
key: "UNSAFE_componentWillReceiveProps",
|
|
205
205
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
206
|
-
if (!(0, _platformFeatureFlags.fg)('
|
|
206
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
207
207
|
if (this.props.defaultUrl !== nextProps.defaultUrl) {
|
|
208
208
|
this.setState(function (state) {
|
|
209
209
|
if (state.url !== nextProps.defaultUrl) {
|
|
@@ -222,7 +222,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
|
|
|
222
222
|
key: "componentDidUpdate",
|
|
223
223
|
value: function componentDidUpdate(prevProps) {
|
|
224
224
|
var _this2 = this;
|
|
225
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
225
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
226
226
|
if (prevProps.defaultUrl !== this.props.defaultUrl) {
|
|
227
227
|
this.setState(function (state) {
|
|
228
228
|
if (state.url !== _this2.props.defaultUrl) {
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "94.
|
|
20
|
+
var packageVersion = "94.14.1";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -43,7 +43,7 @@ var WithProviders = exports.WithProviders = /*#__PURE__*/function (_PureComponen
|
|
|
43
43
|
_this.mounted = false;
|
|
44
44
|
var _providers = {};
|
|
45
45
|
_this.props.providers.forEach(function (name) {
|
|
46
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
46
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
47
47
|
var providerPromise = props.providerFactory.subscribe(name, _this.handleProviderIfMounted);
|
|
48
48
|
_providers[name] = providerPromise;
|
|
49
49
|
} else {
|
|
@@ -64,7 +64,7 @@ var WithProviders = exports.WithProviders = /*#__PURE__*/function (_PureComponen
|
|
|
64
64
|
key: "UNSAFE_componentWillMount",
|
|
65
65
|
value: function UNSAFE_componentWillMount() {
|
|
66
66
|
var _this2 = this;
|
|
67
|
-
if (!(0, _platformFeatureFlags.fg)('
|
|
67
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
68
68
|
var _this$props = this.props,
|
|
69
69
|
providers = _this$props.providers,
|
|
70
70
|
providerFactory = _this$props.providerFactory;
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "94.
|
|
27
|
+
var packageVersion = "94.14.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -79,7 +79,7 @@ var Layer = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
79
79
|
}, {
|
|
80
80
|
key: "UNSAFE_componentWillReceiveProps",
|
|
81
81
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
82
|
-
if (!(0, _platformFeatureFlags.fg)('
|
|
82
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
83
83
|
this.applyPopper(nextProps);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -88,7 +88,7 @@ var Layer = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
88
88
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
89
89
|
var onPositioned = this.props.onPositioned;
|
|
90
90
|
var hasExtractedStyles = this.state.hasExtractedStyles;
|
|
91
|
-
if (this.props !== prevProps && (0, _platformFeatureFlags.fg)('
|
|
91
|
+
if (this.props !== prevProps && (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
92
92
|
this.applyPopper(this.props);
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -37,7 +37,7 @@ var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
37
37
|
localId = _this$props.localId;
|
|
38
38
|
var mentionProvider = providers.mentionProvider,
|
|
39
39
|
profilecardProvider = providers.profilecardProvider;
|
|
40
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
40
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_mention_with_provider_fix')) {
|
|
41
41
|
return /*#__PURE__*/_react.default.createElement(_mentionWithProviders.MentionWithProviders, {
|
|
42
42
|
id: id,
|
|
43
43
|
text: text,
|
|
@@ -58,7 +58,7 @@ var MentionWithProviders = exports.MentionWithProviders = function MentionWithPr
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}, [profilecardProviderResolver]);
|
|
61
|
-
var MentionComponent = profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? _mentionWithProfilecard.default : _element.ResourcedMention;
|
|
61
|
+
var MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? _mentionWithProfilecard.default : _element.ResourcedMention;
|
|
62
62
|
return /*#__PURE__*/_react.default.createElement(MentionComponent, {
|
|
63
63
|
id: id,
|
|
64
64
|
text: text,
|
|
@@ -208,7 +208,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
208
208
|
value: function UNSAFE_componentWillReceiveProps(newProps) {
|
|
209
209
|
// We are delaying `updatePosition` otherwise it happens before the children
|
|
210
210
|
// get rendered and we end up with a wrong position
|
|
211
|
-
if (!(0, _platformFeatureFlags.fg)('
|
|
211
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
212
212
|
this.scheduledUpdatePosition(newProps);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
@@ -251,7 +251,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
251
251
|
key: "componentDidUpdate",
|
|
252
252
|
value: function componentDidUpdate(prevProps) {
|
|
253
253
|
this.handleChangedFocusTrapProp(prevProps);
|
|
254
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
254
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
255
255
|
if (this.props !== prevProps) {
|
|
256
256
|
this.scheduledUpdatePosition(prevProps);
|
|
257
257
|
}
|
|
@@ -185,7 +185,7 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
185
185
|
}(_react.Component);
|
|
186
186
|
};
|
|
187
187
|
var withImageLoader = exports.withImageLoader = function withImageLoader(Wrapped) {
|
|
188
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
188
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
189
189
|
return withImageLoaderNew(Wrapped);
|
|
190
190
|
}
|
|
191
191
|
return withImageLoaderOld(Wrapped);
|
|
@@ -10,7 +10,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
* This function is used to switch between two components based on a feature flag
|
|
11
11
|
* @param ComponentOld
|
|
12
12
|
* @param ComponentNext
|
|
13
|
-
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('
|
|
13
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
|
|
14
14
|
* @returns
|
|
15
15
|
*/
|
|
16
16
|
var withFeatureFlaggedComponent = exports.withFeatureFlaggedComponent = function withFeatureFlaggedComponent(ComponentOld, ComponentNext, featureFlagFn) {
|
|
@@ -78,7 +78,7 @@ var WithPluginState = exports.WithPluginState = /*#__PURE__*/function (_React$Co
|
|
|
78
78
|
(0, _createClass2.default)(WithPluginState, [{
|
|
79
79
|
key: "render",
|
|
80
80
|
value: function render() {
|
|
81
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
81
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
82
82
|
return /*#__PURE__*/_react.default.createElement(WithPluginStateNew, this.props);
|
|
83
83
|
}
|
|
84
84
|
return /*#__PURE__*/_react.default.createElement(WithPluginStateOld, this.props);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -260,10 +260,13 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
260
260
|
ACTION_SUBJECT["INLINE_DIALOG"] = "inlineDialog";
|
|
261
261
|
ACTION_SUBJECT["ENGAGEMENT_PLATFORM"] = "engagementPlatform";
|
|
262
262
|
ACTION_SUBJECT["MEDIA_VIEWER"] = "mediaViewer";
|
|
263
|
+
ACTION_SUBJECT["DECORATION"] = "decoration";
|
|
263
264
|
return ACTION_SUBJECT;
|
|
264
265
|
}({});
|
|
265
266
|
export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
266
267
|
ACTION_SUBJECT_ID["ACTION"] = "action";
|
|
268
|
+
ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
|
|
269
|
+
ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
|
|
267
270
|
ACTION_SUBJECT_ID["ALL"] = "all";
|
|
268
271
|
ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
|
|
269
272
|
ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
|
|
@@ -452,7 +452,7 @@ class ExtensionComponentInner extends Component {
|
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
export const ExtensionComponent = props => {
|
|
455
|
-
if (fg('
|
|
455
|
+
if (fg('platform_editor_react18_extension_component_v2')) {
|
|
456
456
|
return /*#__PURE__*/React.createElement(ExtensionComponentNew, props);
|
|
457
457
|
}
|
|
458
458
|
return /*#__PURE__*/React.createElement(ExtensionComponentOld, props);
|
|
@@ -140,7 +140,7 @@ class RecentLink extends React.Component {
|
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
143
|
-
if (!fg('
|
|
143
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
144
144
|
if (this.props.defaultUrl !== nextProps.defaultUrl) {
|
|
145
145
|
this.setState(state => {
|
|
146
146
|
if (state.url !== nextProps.defaultUrl) {
|
|
@@ -156,7 +156,7 @@ class RecentLink extends React.Component {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
componentDidUpdate(prevProps) {
|
|
159
|
-
if (fg('
|
|
159
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
160
160
|
if (prevProps.defaultUrl !== this.props.defaultUrl) {
|
|
161
161
|
this.setState(state => {
|
|
162
162
|
if (state.url !== this.props.defaultUrl) {
|
|
@@ -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 = "94.
|
|
4
|
+
const packageVersion = "94.14.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -27,7 +27,7 @@ export class WithProviders extends PureComponent {
|
|
|
27
27
|
this.mounted = false;
|
|
28
28
|
const _providers = {};
|
|
29
29
|
this.props.providers.forEach(name => {
|
|
30
|
-
if (fg('
|
|
30
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
31
31
|
const providerPromise = props.providerFactory.subscribe(name, this.handleProviderIfMounted);
|
|
32
32
|
_providers[name] = providerPromise;
|
|
33
33
|
} else {
|
|
@@ -42,7 +42,7 @@ export class WithProviders extends PureComponent {
|
|
|
42
42
|
this.mounted = true;
|
|
43
43
|
}
|
|
44
44
|
UNSAFE_componentWillMount() {
|
|
45
|
-
if (!fg('
|
|
45
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
46
46
|
const {
|
|
47
47
|
providers,
|
|
48
48
|
providerFactory
|
|
@@ -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 = "94.
|
|
16
|
+
const packageVersion = "94.14.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -50,7 +50,7 @@ export default class Layer extends Component {
|
|
|
50
50
|
this.applyPopper(this.props);
|
|
51
51
|
}
|
|
52
52
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
53
|
-
if (!fg('
|
|
53
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
54
54
|
this.applyPopper(nextProps);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -61,7 +61,7 @@ export default class Layer extends Component {
|
|
|
61
61
|
const {
|
|
62
62
|
hasExtractedStyles
|
|
63
63
|
} = this.state;
|
|
64
|
-
if (this.props !== prevProps && fg('
|
|
64
|
+
if (this.props !== prevProps && fg('platform_editor_react18_phase2_v2')) {
|
|
65
65
|
this.applyPopper(this.props);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -19,7 +19,7 @@ export default class Mention extends PureComponent {
|
|
|
19
19
|
mentionProvider,
|
|
20
20
|
profilecardProvider
|
|
21
21
|
} = providers;
|
|
22
|
-
if (fg('
|
|
22
|
+
if (fg('platform_editor_react18_mention_with_provider_fix')) {
|
|
23
23
|
return /*#__PURE__*/React.createElement(MentionWithProviders, {
|
|
24
24
|
id: id,
|
|
25
25
|
text: text,
|
|
@@ -37,7 +37,7 @@ export const MentionWithProviders = ({
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}, [profilecardProviderResolver]);
|
|
40
|
-
const MentionComponent = profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
|
|
40
|
+
const MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
|
|
41
41
|
return /*#__PURE__*/React.createElement(MentionComponent, {
|
|
42
42
|
id: id,
|
|
43
43
|
text: text,
|
|
@@ -168,7 +168,7 @@ export default class Popup extends React.Component {
|
|
|
168
168
|
UNSAFE_componentWillReceiveProps(newProps) {
|
|
169
169
|
// We are delaying `updatePosition` otherwise it happens before the children
|
|
170
170
|
// get rendered and we end up with a wrong position
|
|
171
|
-
if (!fg('
|
|
171
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
172
172
|
this.scheduledUpdatePosition(newProps);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -204,7 +204,7 @@ export default class Popup extends React.Component {
|
|
|
204
204
|
}
|
|
205
205
|
componentDidUpdate(prevProps) {
|
|
206
206
|
this.handleChangedFocusTrapProp(prevProps);
|
|
207
|
-
if (fg('
|
|
207
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
208
208
|
if (this.props !== prevProps) {
|
|
209
209
|
this.scheduledUpdatePosition(prevProps);
|
|
210
210
|
}
|
|
@@ -133,7 +133,7 @@ const withImageLoaderNew = Wrapped => class WithImageLoader extends Component {
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
export const withImageLoader = Wrapped => {
|
|
136
|
-
if (fg('
|
|
136
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
137
137
|
return withImageLoaderNew(Wrapped);
|
|
138
138
|
}
|
|
139
139
|
return withImageLoaderOld(Wrapped);
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
* This function is used to switch between two components based on a feature flag
|
|
5
5
|
* @param ComponentOld
|
|
6
6
|
* @param ComponentNext
|
|
7
|
-
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('
|
|
7
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
10
|
export const withFeatureFlaggedComponent = (ComponentOld, ComponentNext, featureFlagFn) => {
|
|
@@ -57,7 +57,7 @@ class WithPluginState extends React.Component {
|
|
|
57
57
|
super(props);
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
if (fg('
|
|
60
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
61
61
|
return /*#__PURE__*/React.createElement(WithPluginStateNew, this.props);
|
|
62
62
|
}
|
|
63
63
|
return /*#__PURE__*/React.createElement(WithPluginStateOld, this.props);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -260,10 +260,13 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
260
260
|
ACTION_SUBJECT["INLINE_DIALOG"] = "inlineDialog";
|
|
261
261
|
ACTION_SUBJECT["ENGAGEMENT_PLATFORM"] = "engagementPlatform";
|
|
262
262
|
ACTION_SUBJECT["MEDIA_VIEWER"] = "mediaViewer";
|
|
263
|
+
ACTION_SUBJECT["DECORATION"] = "decoration";
|
|
263
264
|
return ACTION_SUBJECT;
|
|
264
265
|
}({});
|
|
265
266
|
export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
266
267
|
ACTION_SUBJECT_ID["ACTION"] = "action";
|
|
268
|
+
ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
|
|
269
|
+
ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
|
|
267
270
|
ACTION_SUBJECT_ID["ALL"] = "all";
|
|
268
271
|
ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
|
|
269
272
|
ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
|
|
@@ -518,7 +518,7 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
|
|
|
518
518
|
return ExtensionComponentInner;
|
|
519
519
|
}(Component);
|
|
520
520
|
export var ExtensionComponent = function ExtensionComponent(props) {
|
|
521
|
-
if (fg('
|
|
521
|
+
if (fg('platform_editor_react18_extension_component_v2')) {
|
|
522
522
|
return /*#__PURE__*/React.createElement(ExtensionComponentNew, props);
|
|
523
523
|
}
|
|
524
524
|
return /*#__PURE__*/React.createElement(ExtensionComponentOld, props);
|
|
@@ -196,7 +196,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
|
|
|
196
196
|
_createClass(RecentLink, [{
|
|
197
197
|
key: "UNSAFE_componentWillReceiveProps",
|
|
198
198
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
199
|
-
if (!fg('
|
|
199
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
200
200
|
if (this.props.defaultUrl !== nextProps.defaultUrl) {
|
|
201
201
|
this.setState(function (state) {
|
|
202
202
|
if (state.url !== nextProps.defaultUrl) {
|
|
@@ -215,7 +215,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
|
|
|
215
215
|
key: "componentDidUpdate",
|
|
216
216
|
value: function componentDidUpdate(prevProps) {
|
|
217
217
|
var _this2 = this;
|
|
218
|
-
if (fg('
|
|
218
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
219
219
|
if (prevProps.defaultUrl !== this.props.defaultUrl) {
|
|
220
220
|
this.setState(function (state) {
|
|
221
221
|
if (state.url !== _this2.props.defaultUrl) {
|
|
@@ -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 = "94.
|
|
10
|
+
var packageVersion = "94.14.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -37,7 +37,7 @@ export var WithProviders = /*#__PURE__*/function (_PureComponent) {
|
|
|
37
37
|
_this.mounted = false;
|
|
38
38
|
var _providers = {};
|
|
39
39
|
_this.props.providers.forEach(function (name) {
|
|
40
|
-
if (fg('
|
|
40
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
41
41
|
var providerPromise = props.providerFactory.subscribe(name, _this.handleProviderIfMounted);
|
|
42
42
|
_providers[name] = providerPromise;
|
|
43
43
|
} else {
|
|
@@ -58,7 +58,7 @@ export var WithProviders = /*#__PURE__*/function (_PureComponent) {
|
|
|
58
58
|
key: "UNSAFE_componentWillMount",
|
|
59
59
|
value: function UNSAFE_componentWillMount() {
|
|
60
60
|
var _this2 = this;
|
|
61
|
-
if (!fg('
|
|
61
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
62
62
|
var _this$props = this.props,
|
|
63
63
|
providers = _this$props.providers,
|
|
64
64
|
providerFactory = _this$props.providerFactory;
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "94.
|
|
24
|
+
var packageVersion = "94.14.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -69,7 +69,7 @@ var Layer = /*#__PURE__*/function (_Component) {
|
|
|
69
69
|
}, {
|
|
70
70
|
key: "UNSAFE_componentWillReceiveProps",
|
|
71
71
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
72
|
-
if (!fg('
|
|
72
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
73
73
|
this.applyPopper(nextProps);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -78,7 +78,7 @@ var Layer = /*#__PURE__*/function (_Component) {
|
|
|
78
78
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
79
79
|
var onPositioned = this.props.onPositioned;
|
|
80
80
|
var hasExtractedStyles = this.state.hasExtractedStyles;
|
|
81
|
-
if (this.props !== prevProps && fg('
|
|
81
|
+
if (this.props !== prevProps && fg('platform_editor_react18_phase2_v2')) {
|
|
82
82
|
this.applyPopper(this.props);
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -28,7 +28,7 @@ var Mention = /*#__PURE__*/function (_PureComponent) {
|
|
|
28
28
|
localId = _this$props.localId;
|
|
29
29
|
var mentionProvider = providers.mentionProvider,
|
|
30
30
|
profilecardProvider = providers.profilecardProvider;
|
|
31
|
-
if (fg('
|
|
31
|
+
if (fg('platform_editor_react18_mention_with_provider_fix')) {
|
|
32
32
|
return /*#__PURE__*/React.createElement(MentionWithProviders, {
|
|
33
33
|
id: id,
|
|
34
34
|
text: text,
|
|
@@ -48,7 +48,7 @@ export var MentionWithProviders = function MentionWithProviders(_ref) {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}, [profilecardProviderResolver]);
|
|
51
|
-
var MentionComponent = profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
|
|
51
|
+
var MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
|
|
52
52
|
return /*#__PURE__*/React.createElement(MentionComponent, {
|
|
53
53
|
id: id,
|
|
54
54
|
text: text,
|
|
@@ -195,7 +195,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
195
195
|
value: function UNSAFE_componentWillReceiveProps(newProps) {
|
|
196
196
|
// We are delaying `updatePosition` otherwise it happens before the children
|
|
197
197
|
// get rendered and we end up with a wrong position
|
|
198
|
-
if (!fg('
|
|
198
|
+
if (!fg('platform_editor_react18_phase2_v2')) {
|
|
199
199
|
this.scheduledUpdatePosition(newProps);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -238,7 +238,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
238
238
|
key: "componentDidUpdate",
|
|
239
239
|
value: function componentDidUpdate(prevProps) {
|
|
240
240
|
this.handleChangedFocusTrapProp(prevProps);
|
|
241
|
-
if (fg('
|
|
241
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
242
242
|
if (this.props !== prevProps) {
|
|
243
243
|
this.scheduledUpdatePosition(prevProps);
|
|
244
244
|
}
|
|
@@ -175,7 +175,7 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
175
175
|
}(Component);
|
|
176
176
|
};
|
|
177
177
|
export var withImageLoader = function withImageLoader(Wrapped) {
|
|
178
|
-
if (fg('
|
|
178
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
179
179
|
return withImageLoaderNew(Wrapped);
|
|
180
180
|
}
|
|
181
181
|
return withImageLoaderOld(Wrapped);
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
* This function is used to switch between two components based on a feature flag
|
|
5
5
|
* @param ComponentOld
|
|
6
6
|
* @param ComponentNext
|
|
7
|
-
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('
|
|
7
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
10
|
export var withFeatureFlaggedComponent = function withFeatureFlaggedComponent(ComponentOld, ComponentNext, featureFlagFn) {
|
|
@@ -71,7 +71,7 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
71
71
|
_createClass(WithPluginState, [{
|
|
72
72
|
key: "render",
|
|
73
73
|
value: function render() {
|
|
74
|
-
if (fg('
|
|
74
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
75
75
|
return /*#__PURE__*/React.createElement(WithPluginStateNew, this.props);
|
|
76
76
|
}
|
|
77
77
|
return /*#__PURE__*/React.createElement(WithPluginStateOld, this.props);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import { type UIAEP } from './utils';
|
|
3
|
+
type CommonAttributes = {
|
|
4
|
+
readingAidsSessionId: string;
|
|
5
|
+
};
|
|
6
|
+
type DefineButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.AI_DEFINITIONS_DEFINE_BUTTON, CommonAttributes, undefined>;
|
|
7
|
+
type AutoHighlightClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.DECORATION, ACTION_SUBJECT_ID.AI_DEFINITIONS_AUTO_HIGHLIGHT, CommonAttributes, undefined>;
|
|
8
|
+
export type AIDefinitionsEventPayload = DefineButtonClickedAEP | AutoHighlightClickedAEP;
|
|
9
|
+
export {};
|
|
@@ -262,10 +262,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
262
262
|
CONTEXT_MENU = "contextMenu",
|
|
263
263
|
INLINE_DIALOG = "inlineDialog",
|
|
264
264
|
ENGAGEMENT_PLATFORM = "engagementPlatform",
|
|
265
|
-
MEDIA_VIEWER = "mediaViewer"
|
|
265
|
+
MEDIA_VIEWER = "mediaViewer",
|
|
266
|
+
DECORATION = "decoration"
|
|
266
267
|
}
|
|
267
268
|
export declare enum ACTION_SUBJECT_ID {
|
|
268
269
|
ACTION = "action",
|
|
270
|
+
AI_DEFINITIONS_DEFINE_BUTTON = "aiDefinitionsDefineButton",
|
|
271
|
+
AI_DEFINITIONS_AUTO_HIGHLIGHT = "aiDefinitionsAutoHighlight",
|
|
269
272
|
ALL = "all",
|
|
270
273
|
ALT_TEXT = "altText",
|
|
271
274
|
ANNOTATE_BUTTON = "annotateButton",
|
|
@@ -3,6 +3,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
|
3
3
|
import type { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { NewCollabSyncUpErrorAttributes } from '../../collab';
|
|
5
5
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
|
|
6
|
+
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
6
7
|
import type { AvatarEventPayload } from './avatar';
|
|
7
8
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
8
9
|
import type { ContextMenuEventPayload } from './context-menu-events';
|
|
@@ -46,7 +47,7 @@ export type SimplifiedNode = {
|
|
|
46
47
|
marks?: string[];
|
|
47
48
|
content?: SimplifiedNode[];
|
|
48
49
|
};
|
|
49
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload;
|
|
50
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | AIDefinitionsEventPayload;
|
|
50
51
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
51
52
|
previousColor: string;
|
|
52
53
|
newColor: string;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
* This function is used to switch between two components based on a feature flag
|
|
4
4
|
* @param ComponentOld
|
|
5
5
|
* @param ComponentNext
|
|
6
|
-
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('
|
|
6
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
9
|
export declare const withFeatureFlaggedComponent: <P extends object>(ComponentOld: React.ComponentType<P>, ComponentNext: React.ComponentType<P>, featureFlagFn: () => boolean) => (props: P) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import { type UIAEP } from './utils';
|
|
3
|
+
type CommonAttributes = {
|
|
4
|
+
readingAidsSessionId: string;
|
|
5
|
+
};
|
|
6
|
+
type DefineButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.AI_DEFINITIONS_DEFINE_BUTTON, CommonAttributes, undefined>;
|
|
7
|
+
type AutoHighlightClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.DECORATION, ACTION_SUBJECT_ID.AI_DEFINITIONS_AUTO_HIGHLIGHT, CommonAttributes, undefined>;
|
|
8
|
+
export type AIDefinitionsEventPayload = DefineButtonClickedAEP | AutoHighlightClickedAEP;
|
|
9
|
+
export {};
|
|
@@ -262,10 +262,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
262
262
|
CONTEXT_MENU = "contextMenu",
|
|
263
263
|
INLINE_DIALOG = "inlineDialog",
|
|
264
264
|
ENGAGEMENT_PLATFORM = "engagementPlatform",
|
|
265
|
-
MEDIA_VIEWER = "mediaViewer"
|
|
265
|
+
MEDIA_VIEWER = "mediaViewer",
|
|
266
|
+
DECORATION = "decoration"
|
|
266
267
|
}
|
|
267
268
|
export declare enum ACTION_SUBJECT_ID {
|
|
268
269
|
ACTION = "action",
|
|
270
|
+
AI_DEFINITIONS_DEFINE_BUTTON = "aiDefinitionsDefineButton",
|
|
271
|
+
AI_DEFINITIONS_AUTO_HIGHLIGHT = "aiDefinitionsAutoHighlight",
|
|
269
272
|
ALL = "all",
|
|
270
273
|
ALT_TEXT = "altText",
|
|
271
274
|
ANNOTATE_BUTTON = "annotateButton",
|
|
@@ -3,6 +3,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
|
3
3
|
import type { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { NewCollabSyncUpErrorAttributes } from '../../collab';
|
|
5
5
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
|
|
6
|
+
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
6
7
|
import type { AvatarEventPayload } from './avatar';
|
|
7
8
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
8
9
|
import type { ContextMenuEventPayload } from './context-menu-events';
|
|
@@ -46,7 +47,7 @@ export type SimplifiedNode = {
|
|
|
46
47
|
marks?: string[];
|
|
47
48
|
content?: SimplifiedNode[];
|
|
48
49
|
};
|
|
49
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload;
|
|
50
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | AIDefinitionsEventPayload;
|
|
50
51
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
51
52
|
previousColor: string;
|
|
52
53
|
newColor: string;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
* This function is used to switch between two components based on a feature flag
|
|
4
4
|
* @param ComponentOld
|
|
5
5
|
* @param ComponentNext
|
|
6
|
-
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('
|
|
6
|
+
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
9
|
export declare const withFeatureFlaggedComponent: <P extends object>(ComponentOld: React.ComponentType<P>, ComponentNext: React.ComponentType<P>, featureFlagFn: () => boolean) => (props: P) => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "94.
|
|
3
|
+
"version": "94.14.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/"
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
138
138
|
"@atlaskit/media-picker": "^67.0.0",
|
|
139
139
|
"@atlaskit/media-ui": "^26.0.0",
|
|
140
|
-
"@atlaskit/media-viewer": "49.2.
|
|
140
|
+
"@atlaskit/media-viewer": "49.2.7",
|
|
141
141
|
"@atlaskit/mention": "^23.3.0",
|
|
142
142
|
"@atlaskit/menu": "^2.13.0",
|
|
143
143
|
"@atlaskit/onboarding": "^12.1.0",
|
|
@@ -250,16 +250,16 @@
|
|
|
250
250
|
"editor_code_block_wrapping_language_change_bug": {
|
|
251
251
|
"type": "boolean"
|
|
252
252
|
},
|
|
253
|
-
"
|
|
253
|
+
"platform_editor_react18_mention_with_provider_fix": {
|
|
254
254
|
"type": "boolean"
|
|
255
255
|
},
|
|
256
|
-
"
|
|
256
|
+
"platform_editor_react18_phase2_v2": {
|
|
257
257
|
"type": "boolean"
|
|
258
258
|
},
|
|
259
259
|
"use-effect-in-use-previous-props": {
|
|
260
260
|
"type": "boolean"
|
|
261
261
|
},
|
|
262
|
-
"
|
|
262
|
+
"platform_editor_react18_extension_component_v2": {
|
|
263
263
|
"type": "boolean"
|
|
264
264
|
},
|
|
265
265
|
"platform-datasources-enable-two-way-sync": {
|