@atlaskit/editor-common 93.6.3 → 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.
- package/CHANGELOG.md +15 -0
- package/afm-cc/tsconfig.json +0 -3
- package/dist/cjs/analytics/types/enums.js +0 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +0 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +0 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/enums.d.ts +0 -1
- package/dist/types/analytics/types/general-events.d.ts +1 -4
- package/dist/types/analytics/types/index.d.ts +1 -1
- package/dist/types/types/feature-flags.d.ts +0 -8
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +0 -1
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +1 -4
- package/dist/types-ts4.5/analytics/types/index.d.ts +1 -1
- package/dist/types-ts4.5/types/feature-flags.d.ts +0 -8
- package/package.json +4 -6
- package/dist/cjs/ufo/experience-store.js +0 -132
- package/dist/cjs/ufo/index.js +0 -24
- package/dist/es2019/ufo/experience-store.js +0 -91
- package/dist/es2019/ufo/index.js +0 -1
- package/dist/esm/ufo/experience-store.js +0 -125
- package/dist/esm/ufo/index.js +0 -1
- package/dist/types/ufo/experience-store.d.ts +0 -33
- package/dist/types/ufo/index.d.ts +0 -1
- package/dist/types-ts4.5/ufo/experience-store.d.ts +0 -33
- package/dist/types-ts4.5/ufo/index.d.ts +0 -1
- package/ufo/package.json +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
3
18
|
## 93.6.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -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";
|
|
@@ -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 = "
|
|
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 = "
|
|
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,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 = "
|
|
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 = "
|
|
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";
|
|
@@ -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 = "
|
|
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 = "
|
|
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,
|
|
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 |
|
|
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 {
|
|
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,
|
|
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 |
|
|
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 {
|
|
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": "
|
|
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.
|
|
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.
|
|
131
|
-
"@atlaskit/icon-object": "^6.
|
|
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",
|
|
@@ -154,7 +153,6 @@
|
|
|
154
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());
|
package/dist/cjs/ufo/index.js
DELETED
|
@@ -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());
|
package/dist/es2019/ufo/index.js
DELETED
|
@@ -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());
|
package/dist/esm/ufo/index.js
DELETED
|
@@ -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
|
-
}
|