@atlaskit/editor-core 189.1.3 → 189.1.5
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 +7 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +2 -3
- package/dist/cjs/plugins/analytics/index.js +1 -160
- package/dist/cjs/plugins/annotation/commands/index.js +1 -1
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -2
- package/dist/cjs/plugins/annotation/pm-plugins/keymap.js +1 -1
- package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +3 -5
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +1 -1
- package/dist/cjs/plugins/collab-edit/utils.js +4 -4
- package/dist/cjs/plugins/extension/actions.js +3 -2
- package/dist/cjs/plugins/extension/extension-api.js +6 -5
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +1 -1
- package/dist/cjs/plugins/find-replace/commands-with-analytics.js +23 -22
- package/dist/cjs/plugins/find-replace/keymap.js +1 -1
- package/dist/cjs/plugins/find-replace/ui/Find.js +6 -6
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +3 -3
- package/dist/cjs/plugins/find-replace/ui/Replace.js +6 -6
- package/dist/cjs/plugins/indentation/commands/index.js +1 -1
- package/dist/cjs/plugins/insert-block/index.js +1 -1
- package/dist/cjs/plugins/layout/actions.js +6 -7
- package/dist/cjs/plugins/macro/actions.js +3 -2
- package/dist/cjs/plugins/paste/pm-plugins/main.js +2 -5
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +1 -1
- package/dist/cjs/plugins/undo-redo/enums.js +3 -3
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +3 -4
- package/dist/cjs/ui/ErrorBoundary/index.js +1 -1
- package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
- package/dist/cjs/ui/WithHelpTrigger/index.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +1 -2
- package/dist/es2019/plugins/analytics/index.js +0 -3
- package/dist/es2019/plugins/annotation/commands/index.js +1 -1
- package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +1 -1
- package/dist/es2019/plugins/annotation/pm-plugins/keymap.js +1 -1
- package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +3 -3
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +1 -1
- package/dist/es2019/plugins/collab-edit/utils.js +1 -1
- package/dist/es2019/plugins/extension/actions.js +2 -1
- package/dist/es2019/plugins/extension/extension-api.js +2 -1
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +1 -1
- package/dist/es2019/plugins/find-replace/commands-with-analytics.js +2 -1
- package/dist/es2019/plugins/find-replace/keymap.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/Find.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/es2019/plugins/indentation/commands/index.js +1 -1
- package/dist/es2019/plugins/insert-block/index.js +1 -1
- package/dist/es2019/plugins/layout/actions.js +1 -2
- package/dist/es2019/plugins/macro/actions.js +2 -1
- package/dist/es2019/plugins/paste/pm-plugins/main.js +2 -4
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +1 -1
- package/dist/es2019/plugins/undo-redo/enums.js +1 -1
- package/dist/es2019/ui/ConfigPanel/FormErrorBoundary.js +1 -2
- package/dist/es2019/ui/ErrorBoundary/index.js +1 -1
- package/dist/es2019/ui/ToolbarFeedback/index.js +1 -1
- package/dist/es2019/ui/WithHelpTrigger/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +1 -2
- package/dist/esm/plugins/analytics/index.js +0 -3
- package/dist/esm/plugins/annotation/commands/index.js +1 -1
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +1 -1
- package/dist/esm/plugins/annotation/pm-plugins/keymap.js +1 -1
- package/dist/esm/plugins/annotation/ui/InlineCommentView.js +3 -3
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +1 -1
- package/dist/esm/plugins/collab-edit/utils.js +1 -1
- package/dist/esm/plugins/extension/actions.js +2 -1
- package/dist/esm/plugins/extension/extension-api.js +2 -1
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +1 -1
- package/dist/esm/plugins/find-replace/commands-with-analytics.js +2 -1
- package/dist/esm/plugins/find-replace/keymap.js +1 -1
- package/dist/esm/plugins/find-replace/ui/Find.js +1 -1
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -1
- package/dist/esm/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/esm/plugins/indentation/commands/index.js +1 -1
- package/dist/esm/plugins/insert-block/index.js +1 -1
- package/dist/esm/plugins/layout/actions.js +1 -2
- package/dist/esm/plugins/macro/actions.js +2 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +2 -4
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +1 -1
- package/dist/esm/plugins/undo-redo/enums.js +1 -1
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -2
- package/dist/esm/ui/ErrorBoundary/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/ui/WithHelpTrigger/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/analytics/index.d.ts +0 -5
- package/dist/types/plugins/annotation/commands/index.d.ts +2 -3
- package/dist/types/plugins/annotation/commands/transform.d.ts +1 -2
- package/dist/types/plugins/annotation/ui/InlineCommentView.d.ts +1 -1
- package/dist/types/plugins/annotation/utils.d.ts +1 -1
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -1
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +1 -1
- package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +1 -1
- package/dist/types/plugins/find-replace/ui/Find.d.ts +1 -1
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +2 -2
- package/dist/types/plugins/find-replace/ui/FindReplaceToolbarButton.d.ts +1 -1
- package/dist/types/plugins/find-replace/ui/Replace.d.ts +3 -2
- package/dist/types/plugins/macro/actions.d.ts +1 -1
- package/dist/types/plugins/paste/util/index.d.ts +1 -2
- package/dist/types/presets/default.d.ts +20 -0
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +3 -3
- package/dist/types/ui/ErrorBoundary/index.d.ts +2 -3
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +2 -2
- package/dist/types-ts4.5/plugins/analytics/index.d.ts +0 -5
- package/dist/types-ts4.5/plugins/annotation/commands/index.d.ts +2 -3
- package/dist/types-ts4.5/plugins/annotation/commands/transform.d.ts +1 -2
- package/dist/types-ts4.5/plugins/annotation/ui/InlineCommentView.d.ts +1 -1
- package/dist/types-ts4.5/plugins/annotation/utils.d.ts +1 -1
- package/dist/types-ts4.5/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -1
- package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +1 -1
- package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +1 -1
- package/dist/types-ts4.5/plugins/find-replace/ui/Find.d.ts +1 -1
- package/dist/types-ts4.5/plugins/find-replace/ui/FindReplace.d.ts +2 -2
- package/dist/types-ts4.5/plugins/find-replace/ui/FindReplaceToolbarButton.d.ts +1 -1
- package/dist/types-ts4.5/plugins/find-replace/ui/Replace.d.ts +3 -2
- package/dist/types-ts4.5/plugins/macro/actions.d.ts +1 -1
- package/dist/types-ts4.5/plugins/paste/util/index.d.ts +1 -2
- package/dist/types-ts4.5/presets/default.d.ts +20 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/FormErrorBoundary.d.ts +3 -3
- package/dist/types-ts4.5/ui/ErrorBoundary/index.d.ts +2 -3
- package/dist/types-ts4.5/ui/Toolbar/toolbar-types.d.ts +2 -2
- package/package.json +3 -3
|
@@ -15,7 +15,6 @@ var _slice = require("../../utils/slice");
|
|
|
15
15
|
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
16
16
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
17
17
|
var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
|
|
18
|
-
var _nodeEvents = require("../analytics/types/node-events");
|
|
19
18
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
20
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -332,16 +331,16 @@ var deleteActiveLayoutNode = exports.deleteActiveLayoutNode = function deleteAct
|
|
|
332
331
|
var formatLayoutName = function formatLayoutName(layout) {
|
|
333
332
|
switch (layout) {
|
|
334
333
|
case 'single':
|
|
335
|
-
return
|
|
334
|
+
return _analytics.LAYOUT_TYPE.SINGLE_COL;
|
|
336
335
|
case 'two_equal':
|
|
337
|
-
return
|
|
336
|
+
return _analytics.LAYOUT_TYPE.TWO_COLS_EQUAL;
|
|
338
337
|
case 'three_equal':
|
|
339
|
-
return
|
|
338
|
+
return _analytics.LAYOUT_TYPE.THREE_COLS_EQUAL;
|
|
340
339
|
case 'two_left_sidebar':
|
|
341
|
-
return
|
|
340
|
+
return _analytics.LAYOUT_TYPE.LEFT_SIDEBAR;
|
|
342
341
|
case 'two_right_sidebar':
|
|
343
|
-
return
|
|
342
|
+
return _analytics.LAYOUT_TYPE.RIGHT_SIDEBAR;
|
|
344
343
|
case 'three_with_sidebars':
|
|
345
|
-
return
|
|
344
|
+
return _analytics.LAYOUT_TYPE.THREE_WITH_SIDEBARS;
|
|
346
345
|
}
|
|
347
346
|
};
|
|
@@ -14,7 +14,8 @@ var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
|
14
14
|
var _validator = require("@atlaskit/editor-common/validator");
|
|
15
15
|
var _insert = require("@atlaskit/editor-common/insert");
|
|
16
16
|
var _pluginFactory = require("../extension/plugin-factory");
|
|
17
|
-
var _analytics = require("
|
|
17
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
18
|
+
var _analytics2 = require("../analytics");
|
|
18
19
|
var _extensionEvents = require("../analytics/types/extension-events");
|
|
19
20
|
var _pluginKey = require("./plugin-key");
|
|
20
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -83,7 +84,7 @@ var insertMacroFromMacroBrowser = exports.insertMacroFromMacroBrowser = function
|
|
|
83
84
|
// Only scroll if we have anything to update, best to avoid surprise scroll
|
|
84
85
|
if (dispatch && tr.docChanged) {
|
|
85
86
|
_macroNode$attrs = macroNode.attrs, extensionType = _macroNode$attrs.extensionType, extensionKey = _macroNode$attrs.extensionKey, layout = _macroNode$attrs.layout, localId = _macroNode$attrs.localId;
|
|
86
|
-
(0,
|
|
87
|
+
(0, _analytics2.addAnalytics)(state, tr, {
|
|
87
88
|
action: _analytics.ACTION.UPDATED,
|
|
88
89
|
actionSubject: _analytics.ACTION_SUBJECT.EXTENSION,
|
|
89
90
|
actionSubjectId: macroNode.type.name,
|
|
@@ -28,7 +28,6 @@ var _util = require("../util");
|
|
|
28
28
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
29
29
|
var _handlers = require("../handlers");
|
|
30
30
|
var _analytics2 = require("./analytics");
|
|
31
|
-
var _analytics3 = require("../../analytics");
|
|
32
31
|
var _utils3 = require("../../../utils");
|
|
33
32
|
var _commands = require("../commands");
|
|
34
33
|
var _utils4 = require("../../annotation/utils");
|
|
@@ -37,8 +36,6 @@ var _tinyMCE = require("../util/tinyMCE");
|
|
|
37
36
|
var _pluginFactory = require("./plugin-factory");
|
|
38
37
|
var _utils5 = require("@atlaskit/editor-prosemirror/utils");
|
|
39
38
|
var _actions = require("../actions");
|
|
40
|
-
// TODO: ED-20519 It requires full analytics extraction to use the plugin injection API
|
|
41
|
-
|
|
42
39
|
// TODO: ED-20519 It requires annotation extraction to use the plugin injection API
|
|
43
40
|
|
|
44
41
|
function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
|
|
@@ -116,7 +113,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
116
113
|
}
|
|
117
114
|
},
|
|
118
115
|
handlePaste: function handlePaste(view, rawEvent, slice) {
|
|
119
|
-
var _text, _analyticsPlugin$perf, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$m;
|
|
116
|
+
var _text, _pluginInjectionApi$a2, _analyticsPlugin$perf, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$m;
|
|
120
117
|
var event = rawEvent;
|
|
121
118
|
if (!event.clipboardData) {
|
|
122
119
|
return false;
|
|
@@ -162,7 +159,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
162
159
|
event.stopPropagation();
|
|
163
160
|
}
|
|
164
161
|
var state = view.state;
|
|
165
|
-
var analyticsPlugin =
|
|
162
|
+
var analyticsPlugin = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 || (_pluginInjectionApi$a2 = _pluginInjectionApi$a2.sharedState) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.currentState();
|
|
166
163
|
var pasteTrackingEnabled = analyticsPlugin === null || analyticsPlugin === void 0 || (_analyticsPlugin$perf = analyticsPlugin.performanceTracking) === null || _analyticsPlugin$perf === void 0 || (_analyticsPlugin$perf = _analyticsPlugin$perf.pasteTracking) === null || _analyticsPlugin$perf === void 0 ? void 0 : _analyticsPlugin$perf.enabled;
|
|
167
164
|
if (pasteTrackingEnabled) {
|
|
168
165
|
var content = (0, _analytics2.getContentNodeTypes)(slice.content);
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.onItemActivated = void 0;
|
|
7
7
|
var _commands = require("../../indentation/commands");
|
|
8
8
|
var _keymaps = require("../../tasks-and-decisions/pm-plugins/keymaps");
|
|
9
|
-
var _analytics = require("
|
|
9
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
10
|
var _indentationButtons = require("../pm-plugins/indentation-buttons");
|
|
11
11
|
var onItemActivated = exports.onItemActivated = function onItemActivated(pluginInjectionApi) {
|
|
12
12
|
return function (_ref) {
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.InputSource = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
8
8
|
var InputSource = exports.InputSource = function (InputSource) {
|
|
9
|
-
InputSource[InputSource["TOOLBAR"] =
|
|
10
|
-
InputSource[InputSource["KEYBOARD"] =
|
|
9
|
+
InputSource[InputSource["TOOLBAR"] = _analytics.INPUT_METHOD.TOOLBAR] = "TOOLBAR";
|
|
10
|
+
InputSource[InputSource["KEYBOARD"] = _analytics.INPUT_METHOD.KEYBOARD] = "KEYBOARD";
|
|
11
11
|
return InputSource;
|
|
12
12
|
}({});
|
|
@@ -18,8 +18,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
18
18
|
var _reactIntlNext = require("react-intl-next");
|
|
19
19
|
var _sectionMessage = _interopRequireDefault(require("@atlaskit/section-message"));
|
|
20
20
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
21
|
-
var _analytics = require("
|
|
22
|
-
var _consts = require("../../plugins/analytics/consts");
|
|
21
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
23
22
|
var _messages = require("./messages");
|
|
24
23
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
24
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -73,7 +72,7 @@ var FormErrorBoundaryInner = /*#__PURE__*/function (_React$Component) {
|
|
|
73
72
|
if (!createAnalyticsEvent) {
|
|
74
73
|
// eslint-disable-next-line no-console
|
|
75
74
|
console.error('ConfigPanel FormErrorBoundary: Missing `createAnalyticsEvent`', {
|
|
76
|
-
channel:
|
|
75
|
+
channel: _analytics.editorAnalyticsChannel,
|
|
77
76
|
product: product,
|
|
78
77
|
error: analyticsErrorPayload
|
|
79
78
|
});
|
|
@@ -96,7 +95,7 @@ var FormErrorBoundaryInner = /*#__PURE__*/function (_React$Component) {
|
|
|
96
95
|
errorStack: errorStack
|
|
97
96
|
}
|
|
98
97
|
};
|
|
99
|
-
createAnalyticsEvent(payload).fire(
|
|
98
|
+
createAnalyticsEvent(payload).fire(_analytics.editorAnalyticsChannel);
|
|
100
99
|
}).catch(function (e) {
|
|
101
100
|
// eslint-disable-next-line no-console
|
|
102
101
|
console.error('Failed to resolve product name from contextIdentifierProvider.', e);
|
|
@@ -14,7 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
17
|
-
var _analytics = require("
|
|
17
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
18
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
19
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
20
|
var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
@@ -26,7 +26,7 @@ var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom
|
|
|
26
26
|
var _ToolbarButton = _interopRequireDefault(require("../ToolbarButton"));
|
|
27
27
|
var _withOuterListeners = _interopRequireDefault(require("../with-outer-listeners"));
|
|
28
28
|
var _styles = require("./styles");
|
|
29
|
-
var _analytics = require("
|
|
29
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
30
30
|
var _eventDispatcher = require("../../event-dispatcher");
|
|
31
31
|
var _feedbackDialog = require("../../plugins/feedback-dialog");
|
|
32
32
|
var _deprecationWarnings = _interopRequireDefault(require("../../utils/deprecation-warnings"));
|
|
@@ -14,7 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
-
var _analytics = require("
|
|
17
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
18
18
|
var _eventDispatcher = require("../../event-dispatcher");
|
|
19
19
|
var _consts = require("../../plugins/analytics/consts");
|
|
20
20
|
var _editorPluginHelpDialog = require("@atlaskit/editor-plugin-help-dialog");
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
|
-
var version = exports.version = "189.1.
|
|
8
|
+
var version = exports.version = "189.1.5";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -4,8 +4,7 @@ import uuid from 'uuid';
|
|
|
4
4
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
5
5
|
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
6
6
|
import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
8
|
-
import { editorAnalyticsChannel } from '../plugins/analytics/consts';
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
|
|
9
8
|
import { getDocStructure } from '../utils/document-logger';
|
|
10
9
|
import { WithEditorView } from './WithEditorView';
|
|
11
10
|
import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import analyticsPlugin from './plugin';
|
|
2
|
-
import { analyticsPluginKey as pluginKey } from './plugin-key';
|
|
3
|
-
export { ACTION_SUBJECT_ID, ACTION_SUBJECT, ACTION, BROWSER_FREEZE_INTERACTION_TYPE, EVENT_TYPE, FULL_WIDTH_MODE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, MODE, PasteContents, PasteSources, PasteTypes, PLATFORMS, PUNC, SYMBOL, TABLE_ACTION, TABLE_BREAKOUT, TRIGGER_METHOD, USER_CONTEXT, DELETE_DIRECTION, fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
4
2
|
export { withAnalytics, addAnalytics } from './utils';
|
|
5
|
-
export const analyticsPluginKey = pluginKey;
|
|
6
3
|
export default analyticsPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
2
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
3
|
-
import { INPUT_METHOD } from '
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { isSelectionValid, getPluginState } from '../utils';
|
|
5
5
|
import { ACTIONS } from '../pm-plugins/types';
|
|
6
6
|
import transform from './transform';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RESOLVE_METHOD } from '
|
|
1
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
2
|
import { bindKeymapWithCommand, addInlineComment } from '../../../keymaps';
|
|
3
3
|
import { setInlineCommentDraftState } from '../commands';
|
|
4
|
-
import { INPUT_METHOD } from '
|
|
4
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
export function keymapPlugin(editorAnalyticsAPI) {
|
|
6
6
|
const list = {};
|
|
7
7
|
bindKeymapWithCommand(addInlineComment.common, setInlineCommentDraftState(editorAnalyticsAPI)(true, INPUT_METHOD.SHORTCUT), list);
|
|
@@ -4,9 +4,9 @@ import { AnnotationViewWrapper } from './AnnotationViewWrapper';
|
|
|
4
4
|
import { AnnotationTestIds } from '../types';
|
|
5
5
|
import { getAnnotationViewKey, getSelectionPositions, getPluginState, getAllAnnotations } from '../utils';
|
|
6
6
|
import { removeInlineCommentNearSelection, updateInlineCommentResolvedState, setInlineCommentDraftState, createAnnotation, closeComponent } from '../commands';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
8
|
-
import { CONTENT_COMPONENT } from '
|
|
9
|
-
import { RESOLVE_METHOD } from '
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { CONTENT_COMPONENT } from '@atlaskit/editor-common/analytics';
|
|
9
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
const findPosForDOM = sel => {
|
|
11
11
|
const {
|
|
12
12
|
$from,
|
|
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
4
4
|
import AvatarsWithPluginState from '../../collab-edit/ui/avatars-with-plugin-state';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import { avatarGroupMessages } from '../messages';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
const toolbarButtonWrapper = css`
|
|
9
9
|
display: flex;
|
|
10
10
|
justify-content: flex-end;
|
|
@@ -4,7 +4,7 @@ import * as themeColors from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
5
5
|
import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { addAnalytics } from '../analytics/utils';
|
|
7
|
-
import { EVENT_TYPE, ACTION, ACTION_SUBJECT } from '
|
|
7
|
+
import { EVENT_TYPE, ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-7269
|
|
9
9
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
10
10
|
export const colors = [themeColors.R100, themeColors.R300, themeColors.R500, themeColors.Y100, themeColors.Y300, themeColors.Y500, themeColors.G100, themeColors.G300, themeColors.G500, themeColors.T100, themeColors.T300, themeColors.T500, themeColors.B100, themeColors.B300, themeColors.B500, themeColors.P100, themeColors.P300, themeColors.P500, themeColors.N70, themeColors.N200, themeColors.N800].map(solid => ({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Selection, NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { replaceSelectedNode, findSelectedNodeOfType, replaceParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
3
|
export { transformSliceToRemoveOpenBodiedExtension } from '@atlaskit/editor-common/transforms';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { addAnalytics } from '../analytics';
|
|
5
6
|
import { TARGET_SELECTION_SOURCE } from '../analytics/types/extension-events';
|
|
6
7
|
import { findExtensionWithLocalId } from './utils';
|
|
7
8
|
import { getPluginState } from './pm-plugins/main';
|
|
@@ -7,7 +7,8 @@ import { pluginKey as macroPluginKey } from '../macro/plugin-key';
|
|
|
7
7
|
import { nodeToJSON } from '../../utils';
|
|
8
8
|
import { setEditingContextToContextPanel } from './commands';
|
|
9
9
|
import { findNodePosWithLocalId, getDataConsumerMark, getNodeTypesReferenced, getSelectedExtension } from './utils';
|
|
10
|
-
import {
|
|
10
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
11
|
+
import { addAnalytics } from '../analytics';
|
|
11
12
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
12
13
|
export const getEditInLegacyMacroBrowser = ({
|
|
13
14
|
view,
|
|
@@ -4,7 +4,7 @@ import WithPluginState from '../../ui/WithPluginState';
|
|
|
4
4
|
import { cancelSearchWithAnalytics, replaceWithAnalytics, replaceAllWithAnalytics, findWithAnalytics, findNextWithAnalytics, findPrevWithAnalytics, activateWithAnalytics } from './commands-with-analytics';
|
|
5
5
|
import { blur, toggleMatchCase } from './commands';
|
|
6
6
|
import FindReplaceToolbarButton from './ui/FindReplaceToolbarButton';
|
|
7
|
-
import { TRIGGER_METHOD } from '
|
|
7
|
+
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
const FindReplaceToolbarButtonWithState = props => {
|
|
9
9
|
const {
|
|
10
10
|
popupsBoundariesElement,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { withAnalytics
|
|
2
|
+
import { withAnalytics } from '../analytics';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { activate, find, findNext, findPrevious, replace, replaceAll, cancelSearch } from './commands';
|
|
4
5
|
export const activateWithAnalytics = ({
|
|
5
6
|
triggerMethod
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
2
|
import { bindKeymapWithCommand, find as findKeymap } from '../../keymaps';
|
|
3
3
|
import { activateWithAnalytics } from './commands-with-analytics';
|
|
4
|
-
import { TRIGGER_METHOD } from '
|
|
4
|
+
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
const activateFindReplace = () => (state, dispatch) => {
|
|
6
6
|
activateWithAnalytics({
|
|
7
7
|
triggerMethod: TRIGGER_METHOD.SHORTCUT
|
|
@@ -10,7 +10,7 @@ import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
|
10
10
|
import MatchCaseIcon from '@atlaskit/icon/glyph/emoji/keyboard';
|
|
11
11
|
import Textfield from '@atlaskit/textfield';
|
|
12
12
|
import { countStyles, sectionWrapperStyles } from './styles';
|
|
13
|
-
import { TRIGGER_METHOD } from '
|
|
13
|
+
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
15
15
|
import rafSchd from 'raf-schd';
|
|
16
16
|
export const FIND_DEBOUNCE_MS = 100;
|
|
@@ -9,7 +9,7 @@ import ToolbarButton, { TOOLBAR_BUTTON } from '../../../ui/ToolbarButton';
|
|
|
9
9
|
import { Dropdown, ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu';
|
|
10
10
|
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
11
11
|
import FindReplace from './FindReplace';
|
|
12
|
-
import { TRIGGER_METHOD } from '
|
|
12
|
+
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
13
13
|
import { ToolTipContent, findKeymapByDescription, tooltip } from '../../../keymaps';
|
|
14
14
|
import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
15
15
|
const toolbarButtonWrapper = css`
|
|
@@ -6,7 +6,7 @@ import Button from '@atlaskit/button/standard-button';
|
|
|
6
6
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
7
7
|
import Textfield from '@atlaskit/textfield';
|
|
8
8
|
import { sectionWrapperStyles, replaceSectionButtonStyles } from './styles';
|
|
9
|
-
import { EVENT_TYPE, ACTION, ACTION_SUBJECT, TRIGGER_METHOD } from '
|
|
9
|
+
import { EVENT_TYPE, ACTION, ACTION_SUBJECT, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
const messages = defineMessages({
|
|
11
11
|
replaceWith: {
|
|
12
12
|
id: 'fabric.editor.replaceWith',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toggleBlockMark } from '../../../commands';
|
|
2
2
|
import { createAnalyticsDispatch } from './utils';
|
|
3
|
-
import { INDENT_DIRECTION, INPUT_METHOD } from '
|
|
3
|
+
import { INDENT_DIRECTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import getAttrsWithChangesRecorder from '../../../utils/getAttrsWithChangesRecorder';
|
|
5
5
|
export const MAX_INDENTATION_LEVEL = 6;
|
|
6
6
|
export const isIndentationAllowed = (schema, node) => {
|
|
@@ -5,7 +5,7 @@ import { insertMacroFromMacroBrowser } from '../macro';
|
|
|
5
5
|
import WithPluginState from '../../ui/WithPluginState';
|
|
6
6
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
7
7
|
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
|
|
8
|
-
import { INPUT_METHOD } from '
|
|
8
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { pluginKey as placeholderTextStateKey } from '../placeholder-text/plugin-key';
|
|
10
10
|
import { pluginKey as macroStateKey } from '../macro/plugin-key';
|
|
11
11
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
@@ -3,9 +3,8 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import { TextSelection, NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { flatmap, mapChildren } from '../../utils/slice';
|
|
5
5
|
import { getStepRange, isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, LAYOUT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
8
|
-
import { LAYOUT_TYPE } from '../analytics/types/node-events';
|
|
9
8
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
10
9
|
export const ONE_COL_LAYOUTS = ['single'];
|
|
11
10
|
export const TWO_COL_LAYOUTS = ['two_equal', 'two_left_sidebar', 'two_right_sidebar'];
|
|
@@ -4,7 +4,8 @@ import { safeInsert, replaceSelectedNode, findSelectedNodeOfType, replaceParentN
|
|
|
4
4
|
import { getValidNode } from '@atlaskit/editor-common/validator';
|
|
5
5
|
import { normaliseNestedLayout } from '@atlaskit/editor-common/insert';
|
|
6
6
|
import { getPluginState as getExtensionPluginState } from '../extension/plugin-factory';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { addAnalytics } from '../analytics';
|
|
8
9
|
import { TARGET_SELECTION_SOURCE } from '../analytics/types/extension-events';
|
|
9
10
|
import { pluginKey } from './plugin-key';
|
|
10
11
|
export const insertMacroFromMacroBrowser = (macroProvider, macroNode, isEditing) => async view => {
|
|
@@ -13,8 +13,6 @@ import { escapeLinks, htmlContainsSingleFile, isPastedFromWord, isPastedFromExce
|
|
|
13
13
|
import { transformSliceNestedExpandToExpand, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, transformSliceToDecisionList } from '@atlaskit/editor-common/transforms';
|
|
14
14
|
import { handleMacroAutoConvert, handleMention, handleParagraphBlockMarks } from '../handlers';
|
|
15
15
|
import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent, handlePasteIntoCaptionWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics } from './analytics';
|
|
16
|
-
// TODO: ED-20519 It requires full analytics extraction to use the plugin injection API
|
|
17
|
-
import { analyticsPluginKey } from '../../analytics';
|
|
18
16
|
import { isInsideBlockQuote, insideTable, measurements } from '../../../utils';
|
|
19
17
|
import { upgradeTextToLists, splitParagraphs } from '../commands';
|
|
20
18
|
// TODO: ED-20519 It requires annotation extraction to use the plugin injection API
|
|
@@ -77,7 +75,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
77
75
|
}
|
|
78
76
|
},
|
|
79
77
|
handlePaste(view, rawEvent, slice) {
|
|
80
|
-
var _text, _analyticsPlugin$perf, _analyticsPlugin$perf2, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$m;
|
|
78
|
+
var _text, _pluginInjectionApi$a2, _pluginInjectionApi$a3, _analyticsPlugin$perf, _analyticsPlugin$perf2, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$m;
|
|
81
79
|
const event = rawEvent;
|
|
82
80
|
if (!event.clipboardData) {
|
|
83
81
|
return false;
|
|
@@ -125,7 +123,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
125
123
|
const {
|
|
126
124
|
state
|
|
127
125
|
} = view;
|
|
128
|
-
const analyticsPlugin =
|
|
126
|
+
const analyticsPlugin = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : (_pluginInjectionApi$a3 = _pluginInjectionApi$a2.sharedState) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.currentState();
|
|
129
127
|
const pasteTrackingEnabled = analyticsPlugin === null || analyticsPlugin === void 0 ? void 0 : (_analyticsPlugin$perf = analyticsPlugin.performanceTracking) === null || _analyticsPlugin$perf === void 0 ? void 0 : (_analyticsPlugin$perf2 = _analyticsPlugin$perf.pasteTracking) === null || _analyticsPlugin$perf2 === void 0 ? void 0 : _analyticsPlugin$perf2.enabled;
|
|
130
128
|
if (pasteTrackingEnabled) {
|
|
131
129
|
const content = getContentNodeTypes(slice.content);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getIndentCommand as indentParagraphOrHeading, getOutdentCommand as outdentParagraphOrHeading } from '../../indentation/commands';
|
|
2
2
|
import { getIndentCommand as indentTaskList, getUnindentCommand as outdentTaskList } from '../../tasks-and-decisions/pm-plugins/keymaps';
|
|
3
|
-
import { INPUT_METHOD } from '
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { pluginKey as indentationButtonsPluginKey } from '../pm-plugins/indentation-buttons';
|
|
5
5
|
export const onItemActivated = pluginInjectionApi => ({
|
|
6
6
|
buttonName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
export let InputSource = function (InputSource) {
|
|
3
3
|
InputSource[InputSource["TOOLBAR"] = INPUT_METHOD.TOOLBAR] = "TOOLBAR";
|
|
4
4
|
InputSource[InputSource["KEYBOARD"] = INPUT_METHOD.KEYBOARD] = "KEYBOARD";
|
|
@@ -3,8 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { injectIntl } from 'react-intl-next';
|
|
4
4
|
import SectionMessage from '@atlaskit/section-message';
|
|
5
5
|
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
7
|
-
import { editorAnalyticsChannel } from '../../plugins/analytics/consts';
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
|
|
8
7
|
import { messages } from './messages';
|
|
9
8
|
class FormErrorBoundaryInner extends React.Component {
|
|
10
9
|
constructor(...args) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
|
-
import { ACTION, EVENT_TYPE } from '
|
|
4
|
+
import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
export class ErrorBoundary extends React.Component {
|
|
6
6
|
constructor(...args) {
|
|
7
7
|
super(...args);
|
|
@@ -12,7 +12,7 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
12
12
|
import ToolbarButton from '../ToolbarButton';
|
|
13
13
|
import withOuterListeners from '../with-outer-listeners';
|
|
14
14
|
import { wrapper, buttonContent, confirmationPopup, confirmationText, confirmationHeader, confirmationImg } from './styles';
|
|
15
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
15
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
16
16
|
import { createDispatch } from '../../event-dispatcher';
|
|
17
17
|
import { openFeedbackDialog } from '../../plugins/feedback-dialog';
|
|
18
18
|
import deprecationWarnings from '../../utils/deprecation-warnings';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { createDispatch } from '../../event-dispatcher';
|
|
6
6
|
import { analyticsEventKey } from '../../plugins/analytics/consts';
|
|
7
7
|
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugin-help-dialog';
|
|
@@ -16,8 +16,7 @@ import uuid from 'uuid';
|
|
|
16
16
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
17
17
|
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
18
18
|
import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
19
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
20
|
-
import { editorAnalyticsChannel } from '../plugins/analytics/consts';
|
|
19
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
|
|
21
20
|
import { getDocStructure } from '../utils/document-logger';
|
|
22
21
|
import { WithEditorView } from './WithEditorView';
|
|
23
22
|
import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import analyticsPlugin from './plugin';
|
|
2
|
-
import { analyticsPluginKey as pluginKey } from './plugin-key';
|
|
3
|
-
export { ACTION_SUBJECT_ID, ACTION_SUBJECT, ACTION, BROWSER_FREEZE_INTERACTION_TYPE, EVENT_TYPE, FULL_WIDTH_MODE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, MODE, PasteContents, PasteSources, PasteTypes, PLATFORMS, PUNC, SYMBOL, TABLE_ACTION, TABLE_BREAKOUT, TRIGGER_METHOD, USER_CONTEXT, DELETE_DIRECTION, fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
4
2
|
export { withAnalytics, addAnalytics } from './utils';
|
|
5
|
-
export var analyticsPluginKey = pluginKey;
|
|
6
3
|
export default analyticsPlugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
3
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
4
|
-
import { INPUT_METHOD } from '
|
|
4
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { isSelectionValid, getPluginState } from '../utils';
|
|
6
6
|
import { ACTIONS } from '../pm-plugins/types';
|
|
7
7
|
import transform from './transform';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
-
import { RESOLVE_METHOD } from '
|
|
4
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
2
|
import { bindKeymapWithCommand, addInlineComment } from '../../../keymaps';
|
|
3
3
|
import { setInlineCommentDraftState } from '../commands';
|
|
4
|
-
import { INPUT_METHOD } from '
|
|
4
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
export function keymapPlugin(editorAnalyticsAPI) {
|
|
6
6
|
var list = {};
|
|
7
7
|
bindKeymapWithCommand(addInlineComment.common, setInlineCommentDraftState(editorAnalyticsAPI)(true, INPUT_METHOD.SHORTCUT), list);
|
|
@@ -5,9 +5,9 @@ import { AnnotationViewWrapper } from './AnnotationViewWrapper';
|
|
|
5
5
|
import { AnnotationTestIds } from '../types';
|
|
6
6
|
import { getAnnotationViewKey, getSelectionPositions, getPluginState, getAllAnnotations } from '../utils';
|
|
7
7
|
import { removeInlineCommentNearSelection, updateInlineCommentResolvedState, setInlineCommentDraftState, createAnnotation, closeComponent } from '../commands';
|
|
8
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
9
|
-
import { CONTENT_COMPONENT } from '
|
|
10
|
-
import { RESOLVE_METHOD } from '
|
|
8
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
9
|
+
import { CONTENT_COMPONENT } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
var findPosForDOM = function findPosForDOM(sel) {
|
|
12
12
|
var $from = sel.$from,
|
|
13
13
|
from = sel.from;
|
|
@@ -6,7 +6,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
6
6
|
import AvatarsWithPluginState from '../../collab-edit/ui/avatars-with-plugin-state';
|
|
7
7
|
import { useIntl } from 'react-intl-next';
|
|
8
8
|
import { avatarGroupMessages } from '../messages';
|
|
9
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
9
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
var toolbarButtonWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n flex-grow: 0;\n align-items: center;\n & > div {\n margin-right: 0;\n }\n"])));
|
|
11
11
|
var toolbarButtonWrapperFullWidth = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n flex-grow: 1;\n"])), toolbarButtonWrapper);
|
|
12
12
|
var AvatarGroupPluginWrapper = function AvatarGroupPluginWrapper(props) {
|
|
@@ -5,7 +5,7 @@ import * as themeColors from '@atlaskit/theme/colors';
|
|
|
5
5
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
6
6
|
import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { addAnalytics } from '../analytics/utils';
|
|
8
|
-
import { EVENT_TYPE, ACTION, ACTION_SUBJECT } from '
|
|
8
|
+
import { EVENT_TYPE, ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-7269
|
|
10
10
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
11
11
|
export var colors = [themeColors.R100, themeColors.R300, themeColors.R500, themeColors.Y100, themeColors.Y300, themeColors.Y500, themeColors.G100, themeColors.G300, themeColors.G500, themeColors.T100, themeColors.T300, themeColors.T500, themeColors.B100, themeColors.B300, themeColors.B500, themeColors.P100, themeColors.P300, themeColors.P500, themeColors.N70, themeColors.N200, themeColors.N800].map(function (solid) {
|
|
@@ -6,7 +6,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
6
6
|
import { Selection, NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { replaceSelectedNode, findSelectedNodeOfType, replaceParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
export { transformSliceToRemoveOpenBodiedExtension } from '@atlaskit/editor-common/transforms';
|
|
9
|
-
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE
|
|
9
|
+
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import { addAnalytics } from '../analytics';
|
|
10
11
|
import { TARGET_SELECTION_SOURCE } from '../analytics/types/extension-events';
|
|
11
12
|
import { findExtensionWithLocalId } from './utils';
|
|
12
13
|
import { getPluginState } from './pm-plugins/main';
|