@atlaskit/editor-common 93.6.2 → 94.0.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/afm-cc/tsconfig.json +0 -3
  3. package/dist/cjs/analytics/types/enums.js +0 -1
  4. package/dist/cjs/link/LinkSearch/index.js +33 -11
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/es2019/analytics/types/enums.js +0 -1
  8. package/dist/es2019/link/LinkSearch/index.js +30 -11
  9. package/dist/es2019/monitoring/error.js +1 -1
  10. package/dist/es2019/ui/DropList/index.js +1 -1
  11. package/dist/esm/analytics/types/enums.js +0 -1
  12. package/dist/esm/link/LinkSearch/index.js +33 -11
  13. package/dist/esm/monitoring/error.js +1 -1
  14. package/dist/esm/ui/DropList/index.js +1 -1
  15. package/dist/types/analytics/index.d.ts +1 -1
  16. package/dist/types/analytics/types/enums.d.ts +0 -1
  17. package/dist/types/analytics/types/general-events.d.ts +1 -4
  18. package/dist/types/analytics/types/index.d.ts +1 -1
  19. package/dist/types/types/feature-flags.d.ts +0 -8
  20. package/dist/types-ts4.5/analytics/index.d.ts +1 -1
  21. package/dist/types-ts4.5/analytics/types/enums.d.ts +0 -1
  22. package/dist/types-ts4.5/analytics/types/general-events.d.ts +1 -4
  23. package/dist/types-ts4.5/analytics/types/index.d.ts +1 -1
  24. package/dist/types-ts4.5/types/feature-flags.d.ts +0 -8
  25. package/package.json +5 -7
  26. package/dist/cjs/ufo/experience-store.js +0 -132
  27. package/dist/cjs/ufo/index.js +0 -24
  28. package/dist/es2019/ufo/experience-store.js +0 -91
  29. package/dist/es2019/ufo/index.js +0 -1
  30. package/dist/esm/ufo/experience-store.js +0 -125
  31. package/dist/esm/ufo/index.js +0 -1
  32. package/dist/types/ufo/experience-store.d.ts +0 -33
  33. package/dist/types/ufo/index.d.ts +0 -1
  34. package/dist/types-ts4.5/ufo/experience-store.d.ts +0 -33
  35. package/dist/types-ts4.5/ufo/index.d.ts +0 -1
  36. package/ufo/package.json +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 94.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#154731](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154731)
8
+ [`c07d9c6cecf8e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c07d9c6cecf8e) -
9
+ EDF-1411 Removed UFO experience events from Editor.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#154186](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154186)
14
+ [`5c316170d29dd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c316170d29dd) -
15
+ Bump @atlaskit/adf-schema to 42.3.1
16
+ - Updated dependencies
17
+
18
+ ## 93.6.3
19
+
20
+ ### Patch Changes
21
+
22
+ - [#154580](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154580)
23
+ [`c3075ce84c94f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c3075ce84c94f) -
24
+ Remediate LinkSearch for React 18
25
+ - [#154580](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154580)
26
+ [`c3075ce84c94f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c3075ce84c94f) -
27
+ Remediate link search component for react 18
28
+
3
29
  ## 93.6.2
4
30
 
5
31
  ### Patch Changes
@@ -147,9 +147,6 @@
147
147
  {
148
148
  "path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
149
149
  },
150
- {
151
- "path": "../../../data/ufo-external/afm-cc/tsconfig.json"
152
- },
153
150
  {
154
151
  "path": "../../../design-system/width-detector/afm-cc/tsconfig.json"
155
152
  },
@@ -124,7 +124,6 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
124
124
  ACTION["ON_CHANGE_CALLBACK"] = "onChangeCalled";
125
125
  ACTION["NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS"] = "newCollabSyncUpErrorNoSteps";
126
126
  ACTION["REMOVE_ICON"] = "removedIcon";
127
- ACTION["UFO_SESSION_COMPLETE"] = "ufoSessionComplete";
128
127
  ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
129
128
  ACTION["DOCUMENT_PROCESSING_ERROR"] = "documentProcessingErrorV2";
130
129
  ACTION["RENDERER_TTI"] = "tti";
@@ -16,6 +16,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _react = _interopRequireDefault(require("react"));
18
18
  var _reactIntlNext = require("react-intl-next");
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _analytics = require("../../analytics");
20
21
  var _LinkSearchList = _interopRequireDefault(require("./LinkSearchList"));
21
22
  var _withActivityProvider = _interopRequireDefault(require("./withActivityProvider"));
@@ -202,17 +203,38 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
202
203
  (0, _createClass2.default)(RecentLink, [{
203
204
  key: "UNSAFE_componentWillReceiveProps",
204
205
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
205
- if (this.props.defaultUrl !== nextProps.defaultUrl) {
206
- this.setState(function (state) {
207
- if (state.url !== nextProps.defaultUrl) {
208
- return {
209
- items: [],
210
- selectedIndex: -1,
211
- url: nextProps.defaultUrl || ''
212
- };
213
- }
214
- return null;
215
- });
206
+ if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
207
+ if (this.props.defaultUrl !== nextProps.defaultUrl) {
208
+ this.setState(function (state) {
209
+ if (state.url !== nextProps.defaultUrl) {
210
+ return {
211
+ items: [],
212
+ selectedIndex: -1,
213
+ url: nextProps.defaultUrl || ''
214
+ };
215
+ }
216
+ return null;
217
+ });
218
+ }
219
+ }
220
+ }
221
+ }, {
222
+ key: "componentDidUpdate",
223
+ value: function componentDidUpdate(prevProps) {
224
+ var _this2 = this;
225
+ if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
226
+ if (prevProps.defaultUrl !== this.props.defaultUrl) {
227
+ this.setState(function (state) {
228
+ if (state.url !== _this2.props.defaultUrl) {
229
+ return {
230
+ items: [],
231
+ selectedIndex: -1,
232
+ url: _this2.props.defaultUrl || ''
233
+ };
234
+ }
235
+ return null;
236
+ });
237
+ }
216
238
  }
217
239
  }
218
240
  }, {
@@ -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 = "93.6.2";
20
+ var packageVersion = "94.0.0";
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
@@ -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 = "93.6.2";
27
+ var packageVersion = "94.0.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -118,7 +118,6 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
118
118
  ACTION["ON_CHANGE_CALLBACK"] = "onChangeCalled";
119
119
  ACTION["NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS"] = "newCollabSyncUpErrorNoSteps";
120
120
  ACTION["REMOVE_ICON"] = "removedIcon";
121
- ACTION["UFO_SESSION_COMPLETE"] = "ufoSessionComplete";
122
121
  ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
123
122
  ACTION["DOCUMENT_PROCESSING_ERROR"] = "documentProcessingErrorV2";
124
123
  ACTION["RENDERER_TTI"] = "tti";
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { injectIntl } from 'react-intl-next';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { INPUT_METHOD } from '../../analytics';
5
6
  import LinkSearchList from './LinkSearchList';
6
7
  import withActivityProvider from './withActivityProvider';
@@ -139,17 +140,35 @@ class RecentLink extends React.Component {
139
140
  };
140
141
  }
141
142
  UNSAFE_componentWillReceiveProps(nextProps) {
142
- if (this.props.defaultUrl !== nextProps.defaultUrl) {
143
- this.setState(state => {
144
- if (state.url !== nextProps.defaultUrl) {
145
- return {
146
- items: [],
147
- selectedIndex: -1,
148
- url: nextProps.defaultUrl || ''
149
- };
150
- }
151
- return null;
152
- });
143
+ if (!fg('platform_editor_react18_phase2')) {
144
+ if (this.props.defaultUrl !== nextProps.defaultUrl) {
145
+ this.setState(state => {
146
+ if (state.url !== nextProps.defaultUrl) {
147
+ return {
148
+ items: [],
149
+ selectedIndex: -1,
150
+ url: nextProps.defaultUrl || ''
151
+ };
152
+ }
153
+ return null;
154
+ });
155
+ }
156
+ }
157
+ }
158
+ componentDidUpdate(prevProps) {
159
+ if (fg('platform_editor_react18_phase2')) {
160
+ if (prevProps.defaultUrl !== this.props.defaultUrl) {
161
+ this.setState(state => {
162
+ if (state.url !== this.props.defaultUrl) {
163
+ return {
164
+ items: [],
165
+ selectedIndex: -1,
166
+ url: this.props.defaultUrl || ''
167
+ };
168
+ }
169
+ return null;
170
+ });
171
+ }
153
172
  }
154
173
  }
155
174
  async componentDidMount() {
@@ -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 = "93.6.2";
4
+ const packageVersion = "94.0.0";
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
@@ -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 = "93.6.2";
16
+ const packageVersion = "94.0.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -118,7 +118,6 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
118
118
  ACTION["ON_CHANGE_CALLBACK"] = "onChangeCalled";
119
119
  ACTION["NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS"] = "newCollabSyncUpErrorNoSteps";
120
120
  ACTION["REMOVE_ICON"] = "removedIcon";
121
- ACTION["UFO_SESSION_COMPLETE"] = "ufoSessionComplete";
122
121
  ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
123
122
  ACTION["DOCUMENT_PROCESSING_ERROR"] = "documentProcessingErrorV2";
124
123
  ACTION["RENDERER_TTI"] = "tti";
@@ -11,6 +11,7 @@ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
13
  import { injectIntl } from 'react-intl-next';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { INPUT_METHOD } from '../../analytics';
15
16
  import LinkSearchList from './LinkSearchList';
16
17
  import withActivityProvider from './withActivityProvider';
@@ -195,17 +196,38 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
195
196
  _createClass(RecentLink, [{
196
197
  key: "UNSAFE_componentWillReceiveProps",
197
198
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
198
- if (this.props.defaultUrl !== nextProps.defaultUrl) {
199
- this.setState(function (state) {
200
- if (state.url !== nextProps.defaultUrl) {
201
- return {
202
- items: [],
203
- selectedIndex: -1,
204
- url: nextProps.defaultUrl || ''
205
- };
206
- }
207
- return null;
208
- });
199
+ if (!fg('platform_editor_react18_phase2')) {
200
+ if (this.props.defaultUrl !== nextProps.defaultUrl) {
201
+ this.setState(function (state) {
202
+ if (state.url !== nextProps.defaultUrl) {
203
+ return {
204
+ items: [],
205
+ selectedIndex: -1,
206
+ url: nextProps.defaultUrl || ''
207
+ };
208
+ }
209
+ return null;
210
+ });
211
+ }
212
+ }
213
+ }
214
+ }, {
215
+ key: "componentDidUpdate",
216
+ value: function componentDidUpdate(prevProps) {
217
+ var _this2 = this;
218
+ if (fg('platform_editor_react18_phase2')) {
219
+ if (prevProps.defaultUrl !== this.props.defaultUrl) {
220
+ this.setState(function (state) {
221
+ if (state.url !== _this2.props.defaultUrl) {
222
+ return {
223
+ items: [],
224
+ selectedIndex: -1,
225
+ url: _this2.props.defaultUrl || ''
226
+ };
227
+ }
228
+ return null;
229
+ });
230
+ }
209
231
  }
210
232
  }
211
233
  }, {
@@ -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 = "93.6.2";
10
+ var packageVersion = "94.0.0";
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
@@ -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 = "93.6.2";
24
+ var packageVersion = "94.0.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,5 +1,5 @@
1
1
  export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, CHANGE_ALIGNMENT_REASON, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, INSERT_MEDIA_VIA, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TABLE_STATUS, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT, TABLE_DISPLAY_MODE, VIEW_METHOD, } from './types';
2
- export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, RestartListsAttributesForListOutdented, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertMediaVia, InsertSmartLinkAEP, ListEventPayload, MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, MediaResizeTrackAction, MediaInputResizeTrackAction, MoveContentEventPayload, NodeCount, NodeEventPayload, OperationalAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UfoSessionCompletePayloadAEP, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, OverflowStateInfo, ViewInlineCommentsButtonEventAEP, ViewEventPayload, } from './types';
2
+ export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, RestartListsAttributesForListOutdented, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertMediaVia, InsertSmartLinkAEP, ListEventPayload, MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, MediaResizeTrackAction, MediaInputResizeTrackAction, MoveContentEventPayload, NodeCount, NodeEventPayload, OperationalAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, OverflowStateInfo, ViewInlineCommentsButtonEventAEP, ViewEventPayload, } from './types';
3
3
  export type { EditorAnalyticsAPI } from './api';
4
4
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
5
5
  export { getAnalyticsEventsFromTransaction } from './utils';
@@ -125,7 +125,6 @@ export declare enum ACTION {
125
125
  ON_CHANGE_CALLBACK = "onChangeCalled",
126
126
  NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS = "newCollabSyncUpErrorNoSteps",
127
127
  REMOVE_ICON = "removedIcon",
128
- UFO_SESSION_COMPLETE = "ufoSessionComplete",
129
128
  INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
130
129
  DOCUMENT_PROCESSING_ERROR = "documentProcessingErrorV2",
131
130
  RENDERER_TTI = "tti",
@@ -60,9 +60,6 @@ type EditorRenderedAEP<T> = OperationalAEP<ACTION.RE_RENDERED, ACTION_SUBJECT.ED
60
60
  propsDifference: PropsDifference<T> | ShallowPropsDifference<T>;
61
61
  count: number;
62
62
  }>;
63
- export type UfoSessionCompletePayloadAEP = OperationalAEP<ACTION.UFO_SESSION_COMPLETE, ACTION_SUBJECT.EDITOR, undefined, {
64
- interval: number;
65
- }>;
66
63
  type BrowserFreezePayload = OperationalAEPWithObjectId<ACTION.BROWSER_FREEZE, ACTION_SUBJECT.EDITOR, undefined, {
67
64
  freezeTime: number;
68
65
  nodeSize: number;
@@ -201,5 +198,5 @@ type CopyLinkToAnchorButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.COPY_LINK_TO_ANCHOR
201
198
  extensionType?: string;
202
199
  isLivePage?: boolean;
203
200
  }>;
204
- export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
201
+ export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
205
202
  export {};
@@ -2,7 +2,7 @@ export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, IN
2
2
  export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, ErrorEventAttributes, ErrorEventPayload, FeatureExposureAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, SimplifiedNode, TransactionEventPayload, } from './events';
3
3
  export type { FormatEventPayload } from './format-events';
4
4
  export type { SubstituteEventPayload } from './substitute-events';
5
- export type { UfoSessionCompletePayloadAEP, ColorPickerAEP, GeneralEventPayload, } from './general-events';
5
+ export type { ColorPickerAEP, GeneralEventPayload } from './general-events';
6
6
  export { INDENT_DIRECTION, INDENT_TYPE } from './format-events';
7
7
  export { PUNC, SYMBOL } from './substitute-events';
8
8
  export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS, } from './general-events';
@@ -126,14 +126,6 @@ export type FeatureFlags = {
126
126
  * @default false
127
127
  */
128
128
  collabAvatarScroll?: boolean;
129
- /**
130
- * @description
131
- * Enable UFO experiences
132
- *
133
- * @see https://product-fabric.atlassian.net/browse/ED-13059
134
- * @default false
135
- */
136
- ufo?: boolean;
137
129
  /**
138
130
  * Split editor toolbar to two lines when viewport is small
139
131
  * @see https://product-fabric.atlassian.net/browse/CERN-1124
@@ -1,5 +1,5 @@
1
1
  export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, CHANGE_ALIGNMENT_REASON, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, INSERT_MEDIA_VIA, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TABLE_STATUS, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT, TABLE_DISPLAY_MODE, VIEW_METHOD, } from './types';
2
- export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, RestartListsAttributesForListOutdented, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertMediaVia, InsertSmartLinkAEP, ListEventPayload, MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, MediaResizeTrackAction, MediaInputResizeTrackAction, MoveContentEventPayload, NodeCount, NodeEventPayload, OperationalAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UfoSessionCompletePayloadAEP, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, OverflowStateInfo, ViewInlineCommentsButtonEventAEP, ViewEventPayload, } from './types';
2
+ export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, RestartListsAttributesForListOutdented, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertMediaVia, InsertSmartLinkAEP, ListEventPayload, MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, MediaResizeTrackAction, MediaInputResizeTrackAction, MoveContentEventPayload, NodeCount, NodeEventPayload, OperationalAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, OverflowStateInfo, ViewInlineCommentsButtonEventAEP, ViewEventPayload, } from './types';
3
3
  export type { EditorAnalyticsAPI } from './api';
4
4
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
5
5
  export { getAnalyticsEventsFromTransaction } from './utils';
@@ -125,7 +125,6 @@ export declare enum ACTION {
125
125
  ON_CHANGE_CALLBACK = "onChangeCalled",
126
126
  NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS = "newCollabSyncUpErrorNoSteps",
127
127
  REMOVE_ICON = "removedIcon",
128
- UFO_SESSION_COMPLETE = "ufoSessionComplete",
129
128
  INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
130
129
  DOCUMENT_PROCESSING_ERROR = "documentProcessingErrorV2",
131
130
  RENDERER_TTI = "tti",
@@ -60,9 +60,6 @@ type EditorRenderedAEP<T> = OperationalAEP<ACTION.RE_RENDERED, ACTION_SUBJECT.ED
60
60
  propsDifference: PropsDifference<T> | ShallowPropsDifference<T>;
61
61
  count: number;
62
62
  }>;
63
- export type UfoSessionCompletePayloadAEP = OperationalAEP<ACTION.UFO_SESSION_COMPLETE, ACTION_SUBJECT.EDITOR, undefined, {
64
- interval: number;
65
- }>;
66
63
  type BrowserFreezePayload = OperationalAEPWithObjectId<ACTION.BROWSER_FREEZE, ACTION_SUBJECT.EDITOR, undefined, {
67
64
  freezeTime: number;
68
65
  nodeSize: number;
@@ -201,5 +198,5 @@ type CopyLinkToAnchorButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.COPY_LINK_TO_ANCHOR
201
198
  extensionType?: string;
202
199
  isLivePage?: boolean;
203
200
  }>;
204
- export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
201
+ export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
205
202
  export {};
@@ -2,7 +2,7 @@ export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, IN
2
2
  export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, ErrorEventAttributes, ErrorEventPayload, FeatureExposureAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, SimplifiedNode, TransactionEventPayload, } from './events';
3
3
  export type { FormatEventPayload } from './format-events';
4
4
  export type { SubstituteEventPayload } from './substitute-events';
5
- export type { UfoSessionCompletePayloadAEP, ColorPickerAEP, GeneralEventPayload, } from './general-events';
5
+ export type { ColorPickerAEP, GeneralEventPayload } from './general-events';
6
6
  export { INDENT_DIRECTION, INDENT_TYPE } from './format-events';
7
7
  export { PUNC, SYMBOL } from './substitute-events';
8
8
  export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS, } from './general-events';
@@ -126,14 +126,6 @@ export type FeatureFlags = {
126
126
  * @default false
127
127
  */
128
128
  collabAvatarScroll?: boolean;
129
- /**
130
- * @description
131
- * Enable UFO experiences
132
- *
133
- * @see https://product-fabric.atlassian.net/browse/ED-13059
134
- * @default false
135
- */
136
- ufo?: boolean;
137
129
  /**
138
130
  * Split editor toolbar to two lines when viewport is small
139
131
  * @see https://product-fabric.atlassian.net/browse/CERN-1124
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "93.6.2",
3
+ "version": "94.0.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/"
@@ -40,7 +40,6 @@
40
40
  "./styles": "./src/styles/index.ts",
41
41
  "./validator": "./src/validator.ts",
42
42
  "./type-ahead": "./src/type-ahead/index.ts",
43
- "./ufo": "./src/ufo/index.ts",
44
43
  "./insert": "./src/insert/index.ts",
45
44
  "./types": "./src/types/index.ts",
46
45
  "./ui": "./src/ui/index.tsx",
@@ -110,7 +109,7 @@
110
109
  },
111
110
  "dependencies": {
112
111
  "@atlaskit/activity-provider": "^2.4.0",
113
- "@atlaskit/adf-schema": "^42.0.2",
112
+ "@atlaskit/adf-schema": "^42.3.1",
114
113
  "@atlaskit/adf-utils": "^19.9.0",
115
114
  "@atlaskit/analytics-listeners": "^8.11.0",
116
115
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
@@ -127,8 +126,8 @@
127
126
  "@atlaskit/editor-shared-styles": "^3.0.0",
128
127
  "@atlaskit/editor-tables": "^2.8.0",
129
128
  "@atlaskit/emoji": "^67.8.0",
130
- "@atlaskit/icon": "^22.22.0",
131
- "@atlaskit/icon-object": "^6.5.0",
129
+ "@atlaskit/icon": "^22.23.0",
130
+ "@atlaskit/icon-object": "^6.6.0",
132
131
  "@atlaskit/link-datasource": "^3.6.0",
133
132
  "@atlaskit/link-picker": "^1.47.0",
134
133
  "@atlaskit/media-card": "^78.7.0",
@@ -151,10 +150,9 @@
151
150
  "@atlaskit/spinner": "^16.3.0",
152
151
  "@atlaskit/task-decision": "^17.11.0",
153
152
  "@atlaskit/textfield": "^6.5.0",
154
- "@atlaskit/tmp-editor-statsig": "^2.6.0",
153
+ "@atlaskit/tmp-editor-statsig": "^2.7.0",
155
154
  "@atlaskit/tokens": "^2.0.0",
156
155
  "@atlaskit/tooltip": "^18.8.0",
157
- "@atlaskit/ufo": "^0.3.0",
158
156
  "@atlaskit/width-detector": "^4.3.0",
159
157
  "@babel/runtime": "^7.0.0",
160
158
  "@emotion/react": "^11.7.1",
@@ -1,132 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.experienceConfig = exports.RELIABILITY_INTERVAL = exports.ExperienceStore = exports.EditorExperience = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _ufo = require("@atlaskit/ufo");
12
- var experienceConfig = exports.experienceConfig = {
13
- type: _ufo.ExperienceTypes.Operation,
14
- performanceType: _ufo.ExperiencePerformanceTypes.Custom,
15
- platform: {
16
- component: 'editor'
17
- }
18
- };
19
- var EditorExperience = exports.EditorExperience = /*#__PURE__*/function (EditorExperience) {
20
- EditorExperience["loadEditor"] = "load";
21
- EditorExperience["typing"] = "type";
22
- EditorExperience["interaction"] = "interact";
23
- EditorExperience["editSession"] = "edit-session";
24
- return EditorExperience;
25
- }({});
26
- var RELIABILITY_INTERVAL = exports.RELIABILITY_INTERVAL = 30000;
27
- var ExperienceStore = exports.ExperienceStore = /*#__PURE__*/function () {
28
- function ExperienceStore() {
29
- (0, _classCallCheck2.default)(this, ExperienceStore);
30
- this.experiences = new Map();
31
- for (var _i = 0, _Object$values = Object.values(EditorExperience); _i < _Object$values.length; _i++) {
32
- var experienceId = _Object$values[_i];
33
- var experience = new _ufo.UFOExperience(experienceId, experienceConfig);
34
- this.experiences.set(experienceId, experience);
35
- }
36
- }
37
- (0, _createClass2.default)(ExperienceStore, [{
38
- key: "get",
39
- value: function get(experienceId) {
40
- return this.experiences.get(experienceId);
41
- }
42
- }, {
43
- key: "getActive",
44
- value: function getActive(experienceId) {
45
- var experience = this.experiences.get(experienceId);
46
- if (!(experience !== null && experience !== void 0 && experience.state.final)) {
47
- return experience;
48
- }
49
- }
50
- }, {
51
- key: "getAll",
52
- value: function getAll() {
53
- return Array.from(this.experiences.values());
54
- }
55
- }, {
56
- key: "start",
57
- value: function start(experienceId, startTime) {
58
- var _this$get;
59
- (_this$get = this.get(experienceId)) === null || _this$get === void 0 || _this$get.start(startTime);
60
- }
61
- }, {
62
- key: "addMetadata",
63
- value: function addMetadata(experienceId, metadata) {
64
- var _this$get2;
65
- (_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0 || _this$get2.addMetadata(metadata);
66
- }
67
- }, {
68
- key: "mark",
69
- value: function mark(experienceId, _mark, value) {
70
- var _this$get3;
71
- (_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0 || _this$get3.mark(_mark, value);
72
- }
73
- }, {
74
- key: "success",
75
- value: function success(experienceId, metadata) {
76
- var _this$getActive;
77
- return (_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
78
- metadata: metadata
79
- });
80
- }
81
- }, {
82
- key: "fail",
83
- value: function fail(experienceId, metadata) {
84
- var _this$getActive2;
85
- (_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0 || _this$getActive2.failure({
86
- metadata: metadata
87
- });
88
- }
89
- }, {
90
- key: "abort",
91
- value: function abort(experienceId, metadata) {
92
- var _this = this;
93
- // We add this wait in here because when React catches an error it unmounts the component
94
- // before the error boundary's componentDidCatch is called
95
- // In this case we want to fail the experience, but without this wait, abort is called first
96
- setTimeout(function () {
97
- var _this$getActive3;
98
- (_this$getActive3 = _this.getActive(experienceId)) === null || _this$getActive3 === void 0 || _this$getActive3.abort({
99
- metadata: metadata
100
- });
101
- }, 0);
102
- }
103
- }, {
104
- key: "abortAll",
105
- value: function abortAll(metadata) {
106
- var _this2 = this;
107
- this.experiences.forEach(function (experience) {
108
- _this2.abort(experience.id, metadata);
109
- });
110
- }
111
- }, {
112
- key: "failAll",
113
- value: function failAll(metadata) {
114
- var _this3 = this;
115
- this.experiences.forEach(function (experience) {
116
- _this3.fail(experience.id, metadata);
117
- });
118
- }
119
- }], [{
120
- key: "getInstance",
121
- value: function getInstance(view) {
122
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
123
- if (!this.stores.get(view) || options !== null && options !== void 0 && options.forceNewInstance) {
124
- var store = new ExperienceStore();
125
- this.stores.set(view, store);
126
- }
127
- return this.stores.get(view);
128
- }
129
- }]);
130
- return ExperienceStore;
131
- }();
132
- (0, _defineProperty2.default)(ExperienceStore, "stores", new WeakMap());
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "EditorExperience", {
7
- enumerable: true,
8
- get: function get() {
9
- return _experienceStore.EditorExperience;
10
- }
11
- });
12
- Object.defineProperty(exports, "ExperienceStore", {
13
- enumerable: true,
14
- get: function get() {
15
- return _experienceStore.ExperienceStore;
16
- }
17
- });
18
- Object.defineProperty(exports, "RELIABILITY_INTERVAL", {
19
- enumerable: true,
20
- get: function get() {
21
- return _experienceStore.RELIABILITY_INTERVAL;
22
- }
23
- });
24
- var _experienceStore = require("./experience-store");
@@ -1,91 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { ExperiencePerformanceTypes, ExperienceTypes, UFOExperience } from '@atlaskit/ufo';
3
- export const experienceConfig = {
4
- type: ExperienceTypes.Operation,
5
- performanceType: ExperiencePerformanceTypes.Custom,
6
- platform: {
7
- component: 'editor'
8
- }
9
- };
10
- export let EditorExperience = /*#__PURE__*/function (EditorExperience) {
11
- EditorExperience["loadEditor"] = "load";
12
- EditorExperience["typing"] = "type";
13
- EditorExperience["interaction"] = "interact";
14
- EditorExperience["editSession"] = "edit-session";
15
- return EditorExperience;
16
- }({});
17
- export const RELIABILITY_INTERVAL = 30000;
18
- export class ExperienceStore {
19
- constructor() {
20
- this.experiences = new Map();
21
- for (const experienceId of Object.values(EditorExperience)) {
22
- const experience = new UFOExperience(experienceId, experienceConfig);
23
- this.experiences.set(experienceId, experience);
24
- }
25
- }
26
- static getInstance(view, options = {}) {
27
- if (!this.stores.get(view) || options !== null && options !== void 0 && options.forceNewInstance) {
28
- const store = new ExperienceStore();
29
- this.stores.set(view, store);
30
- }
31
- return this.stores.get(view);
32
- }
33
- get(experienceId) {
34
- return this.experiences.get(experienceId);
35
- }
36
- getActive(experienceId) {
37
- const experience = this.experiences.get(experienceId);
38
- if (!(experience !== null && experience !== void 0 && experience.state.final)) {
39
- return experience;
40
- }
41
- }
42
- getAll() {
43
- return Array.from(this.experiences.values());
44
- }
45
- start(experienceId, startTime) {
46
- var _this$get;
47
- (_this$get = this.get(experienceId)) === null || _this$get === void 0 ? void 0 : _this$get.start(startTime);
48
- }
49
- addMetadata(experienceId, metadata) {
50
- var _this$get2;
51
- (_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0 ? void 0 : _this$get2.addMetadata(metadata);
52
- }
53
- mark(experienceId, mark, value) {
54
- var _this$get3;
55
- (_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0 ? void 0 : _this$get3.mark(mark, value);
56
- }
57
- success(experienceId, metadata) {
58
- var _this$getActive;
59
- return (_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
60
- metadata
61
- });
62
- }
63
- fail(experienceId, metadata) {
64
- var _this$getActive2;
65
- (_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0 ? void 0 : _this$getActive2.failure({
66
- metadata
67
- });
68
- }
69
- abort(experienceId, metadata) {
70
- // We add this wait in here because when React catches an error it unmounts the component
71
- // before the error boundary's componentDidCatch is called
72
- // In this case we want to fail the experience, but without this wait, abort is called first
73
- setTimeout(() => {
74
- var _this$getActive3;
75
- (_this$getActive3 = this.getActive(experienceId)) === null || _this$getActive3 === void 0 ? void 0 : _this$getActive3.abort({
76
- metadata
77
- });
78
- }, 0);
79
- }
80
- abortAll(metadata) {
81
- this.experiences.forEach(experience => {
82
- this.abort(experience.id, metadata);
83
- });
84
- }
85
- failAll(metadata) {
86
- this.experiences.forEach(experience => {
87
- this.fail(experience.id, metadata);
88
- });
89
- }
90
- }
91
- _defineProperty(ExperienceStore, "stores", new WeakMap());
@@ -1 +0,0 @@
1
- export { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from './experience-store';
@@ -1,125 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- import { ExperiencePerformanceTypes, ExperienceTypes, UFOExperience } from '@atlaskit/ufo';
5
- export var experienceConfig = {
6
- type: ExperienceTypes.Operation,
7
- performanceType: ExperiencePerformanceTypes.Custom,
8
- platform: {
9
- component: 'editor'
10
- }
11
- };
12
- export var EditorExperience = /*#__PURE__*/function (EditorExperience) {
13
- EditorExperience["loadEditor"] = "load";
14
- EditorExperience["typing"] = "type";
15
- EditorExperience["interaction"] = "interact";
16
- EditorExperience["editSession"] = "edit-session";
17
- return EditorExperience;
18
- }({});
19
- export var RELIABILITY_INTERVAL = 30000;
20
- export var ExperienceStore = /*#__PURE__*/function () {
21
- function ExperienceStore() {
22
- _classCallCheck(this, ExperienceStore);
23
- this.experiences = new Map();
24
- for (var _i = 0, _Object$values = Object.values(EditorExperience); _i < _Object$values.length; _i++) {
25
- var experienceId = _Object$values[_i];
26
- var experience = new UFOExperience(experienceId, experienceConfig);
27
- this.experiences.set(experienceId, experience);
28
- }
29
- }
30
- _createClass(ExperienceStore, [{
31
- key: "get",
32
- value: function get(experienceId) {
33
- return this.experiences.get(experienceId);
34
- }
35
- }, {
36
- key: "getActive",
37
- value: function getActive(experienceId) {
38
- var experience = this.experiences.get(experienceId);
39
- if (!(experience !== null && experience !== void 0 && experience.state.final)) {
40
- return experience;
41
- }
42
- }
43
- }, {
44
- key: "getAll",
45
- value: function getAll() {
46
- return Array.from(this.experiences.values());
47
- }
48
- }, {
49
- key: "start",
50
- value: function start(experienceId, startTime) {
51
- var _this$get;
52
- (_this$get = this.get(experienceId)) === null || _this$get === void 0 || _this$get.start(startTime);
53
- }
54
- }, {
55
- key: "addMetadata",
56
- value: function addMetadata(experienceId, metadata) {
57
- var _this$get2;
58
- (_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0 || _this$get2.addMetadata(metadata);
59
- }
60
- }, {
61
- key: "mark",
62
- value: function mark(experienceId, _mark, value) {
63
- var _this$get3;
64
- (_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0 || _this$get3.mark(_mark, value);
65
- }
66
- }, {
67
- key: "success",
68
- value: function success(experienceId, metadata) {
69
- var _this$getActive;
70
- return (_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
71
- metadata: metadata
72
- });
73
- }
74
- }, {
75
- key: "fail",
76
- value: function fail(experienceId, metadata) {
77
- var _this$getActive2;
78
- (_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0 || _this$getActive2.failure({
79
- metadata: metadata
80
- });
81
- }
82
- }, {
83
- key: "abort",
84
- value: function abort(experienceId, metadata) {
85
- var _this = this;
86
- // We add this wait in here because when React catches an error it unmounts the component
87
- // before the error boundary's componentDidCatch is called
88
- // In this case we want to fail the experience, but without this wait, abort is called first
89
- setTimeout(function () {
90
- var _this$getActive3;
91
- (_this$getActive3 = _this.getActive(experienceId)) === null || _this$getActive3 === void 0 || _this$getActive3.abort({
92
- metadata: metadata
93
- });
94
- }, 0);
95
- }
96
- }, {
97
- key: "abortAll",
98
- value: function abortAll(metadata) {
99
- var _this2 = this;
100
- this.experiences.forEach(function (experience) {
101
- _this2.abort(experience.id, metadata);
102
- });
103
- }
104
- }, {
105
- key: "failAll",
106
- value: function failAll(metadata) {
107
- var _this3 = this;
108
- this.experiences.forEach(function (experience) {
109
- _this3.fail(experience.id, metadata);
110
- });
111
- }
112
- }], [{
113
- key: "getInstance",
114
- value: function getInstance(view) {
115
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
116
- if (!this.stores.get(view) || options !== null && options !== void 0 && options.forceNewInstance) {
117
- var store = new ExperienceStore();
118
- this.stores.set(view, store);
119
- }
120
- return this.stores.get(view);
121
- }
122
- }]);
123
- return ExperienceStore;
124
- }();
125
- _defineProperty(ExperienceStore, "stores", new WeakMap());
@@ -1 +0,0 @@
1
- export { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from './experience-store';
@@ -1,33 +0,0 @@
1
- import { type EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import { UFOExperience } from '@atlaskit/ufo';
3
- import type { CustomData, ExperienceConfig } from '@atlaskit/ufo/types';
4
- export declare const experienceConfig: ExperienceConfig;
5
- export declare enum EditorExperience {
6
- loadEditor = "load",
7
- typing = "type",
8
- interaction = "interact",
9
- editSession = "edit-session"
10
- }
11
- export declare const RELIABILITY_INTERVAL = 30000;
12
- type TypeOfEditorExperience = typeof EditorExperience;
13
- type ValueOfEditorExperience = TypeOfEditorExperience[keyof TypeOfEditorExperience];
14
- export declare class ExperienceStore {
15
- private static stores;
16
- private experiences;
17
- private constructor();
18
- static getInstance(view: EditorView, options?: {
19
- forceNewInstance?: boolean;
20
- }): ExperienceStore;
21
- get(experienceId: string): UFOExperience | undefined;
22
- getActive(experienceId: string): UFOExperience | undefined;
23
- getAll(): UFOExperience[];
24
- start(experienceId: ValueOfEditorExperience, startTime?: number): void;
25
- addMetadata(experienceId: string, metadata: CustomData): void;
26
- mark(experienceId: string, mark: string, value: number): void;
27
- success(experienceId: string, metadata?: CustomData): Promise<boolean | null> | undefined;
28
- fail(experienceId: string, metadata?: CustomData): void;
29
- abort(experienceId: string, metadata?: CustomData): void;
30
- abortAll(metadata?: CustomData): void;
31
- failAll(metadata?: CustomData): void;
32
- }
33
- export {};
@@ -1 +0,0 @@
1
- export { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from './experience-store';
@@ -1,33 +0,0 @@
1
- import { type EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import { UFOExperience } from '@atlaskit/ufo';
3
- import type { CustomData, ExperienceConfig } from '@atlaskit/ufo/types';
4
- export declare const experienceConfig: ExperienceConfig;
5
- export declare enum EditorExperience {
6
- loadEditor = "load",
7
- typing = "type",
8
- interaction = "interact",
9
- editSession = "edit-session"
10
- }
11
- export declare const RELIABILITY_INTERVAL = 30000;
12
- type TypeOfEditorExperience = typeof EditorExperience;
13
- type ValueOfEditorExperience = TypeOfEditorExperience[keyof TypeOfEditorExperience];
14
- export declare class ExperienceStore {
15
- private static stores;
16
- private experiences;
17
- private constructor();
18
- static getInstance(view: EditorView, options?: {
19
- forceNewInstance?: boolean;
20
- }): ExperienceStore;
21
- get(experienceId: string): UFOExperience | undefined;
22
- getActive(experienceId: string): UFOExperience | undefined;
23
- getAll(): UFOExperience[];
24
- start(experienceId: ValueOfEditorExperience, startTime?: number): void;
25
- addMetadata(experienceId: string, metadata: CustomData): void;
26
- mark(experienceId: string, mark: string, value: number): void;
27
- success(experienceId: string, metadata?: CustomData): Promise<boolean | null> | undefined;
28
- fail(experienceId: string, metadata?: CustomData): void;
29
- abort(experienceId: string, metadata?: CustomData): void;
30
- abortAll(metadata?: CustomData): void;
31
- failAll(metadata?: CustomData): void;
32
- }
33
- export {};
@@ -1 +0,0 @@
1
- export { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from './experience-store';
package/ufo/package.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "name": "@atlaskit/editor-common/ufo",
3
- "main": "../dist/cjs/ufo/index.js",
4
- "module": "../dist/esm/ufo/index.js",
5
- "module:es2019": "../dist/es2019/ufo/index.js",
6
- "sideEffects": false,
7
- "types": "../dist/types/ufo/index.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.4": {
10
- "*": [
11
- "../dist/types-ts4.5/ufo/index.d.ts"
12
- ]
13
- }
14
- }
15
- }