@atlaskit/editor-core 189.3.18 → 189.3.20
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 +14 -0
- package/dist/cjs/actions/index.js +6 -5
- package/dist/cjs/plugins/avatar-group/index.js +3 -1
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +2 -1
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +2 -2
- package/dist/cjs/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +1 -1
- package/dist/cjs/plugins/collab-edit/utils.js +2 -3
- package/dist/cjs/plugins/extension/actions.js +2 -3
- package/dist/cjs/plugins/extension/context-panel.js +117 -107
- package/dist/cjs/plugins/extension/extension-api.js +1 -1
- package/dist/cjs/plugins/extension/index.js +4 -1
- package/dist/cjs/plugins/extension/plugin-factory.js +2 -2
- package/dist/cjs/plugins/extension/pm-plugins/unique-id.js +2 -2
- package/dist/cjs/plugins/extension/toolbar.js +1 -1
- package/dist/cjs/plugins/extension/utils.js +4 -5
- package/dist/cjs/plugins/find-replace/plugin.js +3 -3
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/presets/default.js +0 -11
- package/dist/cjs/test-utils.js +1 -8
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +4 -3
- package/dist/cjs/ui/ContentStyles/index.js +4 -4
- package/dist/cjs/ui/ToolbarFeedback/index.js +2 -2
- package/dist/cjs/ui/WithHelpTrigger/index.js +2 -2
- package/dist/cjs/utils/nodes-by-localIds.js +1 -29
- package/dist/cjs/utils/selection.js +1 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +5 -4
- package/dist/es2019/plugins/avatar-group/index.js +3 -1
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +2 -1
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +1 -1
- package/dist/es2019/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +1 -1
- package/dist/es2019/plugins/collab-edit/utils.js +2 -3
- package/dist/es2019/plugins/extension/actions.js +1 -2
- package/dist/es2019/plugins/extension/context-panel.js +55 -47
- package/dist/es2019/plugins/extension/extension-api.js +1 -1
- package/dist/es2019/plugins/extension/index.js +4 -1
- package/dist/es2019/plugins/extension/plugin-factory.js +1 -1
- package/dist/es2019/plugins/extension/pm-plugins/macro/actions.js +1 -2
- package/dist/es2019/plugins/extension/pm-plugins/unique-id.js +1 -1
- package/dist/es2019/plugins/extension/toolbar.js +1 -1
- package/dist/es2019/plugins/extension/utils.js +1 -2
- package/dist/es2019/plugins/find-replace/plugin.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/presets/default.js +0 -13
- package/dist/es2019/test-utils.js +0 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -3
- package/dist/es2019/ui/ContentStyles/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/utils/nodes-by-localIds.js +0 -27
- package/dist/es2019/utils/selection.js +0 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +5 -4
- package/dist/esm/plugins/avatar-group/index.js +3 -1
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +2 -1
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +1 -1
- package/dist/esm/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/esm/plugins/collab-edit/ui/avatars.js +1 -1
- package/dist/esm/plugins/collab-edit/utils.js +2 -3
- package/dist/esm/plugins/extension/actions.js +1 -2
- package/dist/esm/plugins/extension/context-panel.js +115 -105
- package/dist/esm/plugins/extension/extension-api.js +1 -1
- package/dist/esm/plugins/extension/index.js +4 -1
- package/dist/esm/plugins/extension/plugin-factory.js +1 -1
- package/dist/esm/plugins/extension/pm-plugins/macro/actions.js +1 -2
- package/dist/esm/plugins/extension/pm-plugins/unique-id.js +1 -1
- package/dist/esm/plugins/extension/toolbar.js +1 -1
- package/dist/esm/plugins/extension/utils.js +1 -2
- package/dist/esm/plugins/find-replace/plugin.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/presets/default.js +0 -11
- package/dist/esm/test-utils.js +0 -5
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -3
- package/dist/esm/ui/ContentStyles/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/utils/nodes-by-localIds.js +0 -28
- package/dist/esm/utils/selection.js +0 -14
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/avatar-group/index.d.ts +3 -2
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -1
- package/dist/types/plugins/collab-edit/ui/avatars-with-plugin-state.d.ts +4 -0
- package/dist/types/plugins/collab-edit/ui/avatars.d.ts +2 -0
- package/dist/types/plugins/collab-edit/utils.d.ts +2 -1
- package/dist/types/plugins/extension/actions.d.ts +1 -1
- package/dist/types/plugins/extension/context-panel.d.ts +4 -2
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +3 -4
- package/dist/types/plugins/extension/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +2 -4
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +2 -3
- package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -3
- package/dist/types/plugins/extension/ui/Extension/index.d.ts +2 -3
- package/dist/types/plugins/extension/utils.d.ts +1 -2
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/test-utils.d.ts +1 -2
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/utils/document.d.ts +1 -1
- package/dist/types/utils/nodes-by-localIds.d.ts +0 -5
- package/dist/types/utils/selection.d.ts +1 -3
- package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -1
- package/dist/types-ts4.5/plugins/collab-edit/ui/avatars-with-plugin-state.d.ts +4 -0
- package/dist/types-ts4.5/plugins/collab-edit/ui/avatars.d.ts +2 -0
- package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/actions.d.ts +1 -1
- package/dist/types-ts4.5/plugins/extension/context-panel.d.ts +4 -2
- package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +3 -4
- package/dist/types-ts4.5/plugins/extension/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +2 -4
- package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +2 -3
- package/dist/types-ts4.5/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -3
- package/dist/types-ts4.5/plugins/extension/ui/Extension/index.d.ts +2 -3
- package/dist/types-ts4.5/plugins/extension/utils.d.ts +1 -2
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/test-utils.d.ts +1 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +2 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/utils/document.d.ts +1 -1
- package/dist/types-ts4.5/utils/nodes-by-localIds.d.ts +0 -5
- package/dist/types-ts4.5/utils/selection.d.ts +1 -3
- package/package.json +5 -8
- package/dist/cjs/plugins/analytics/consts.js +0 -10
- package/dist/cjs/plugins/analytics/index.js +0 -16
- package/dist/cjs/plugins/analytics/plugin-key.js +0 -14
- package/dist/cjs/plugins/analytics/plugin.js +0 -131
- package/dist/cjs/plugins/analytics/types/dispatch-analytics-event.js +0 -5
- package/dist/cjs/plugins/analytics/types/enums.js +0 -54
- package/dist/cjs/plugins/analytics/types/events.js +0 -5
- package/dist/cjs/plugins/analytics/types/extension-events.js +0 -24
- package/dist/cjs/plugins/analytics/types/general-events.js +0 -30
- package/dist/cjs/plugins/analytics/types/index.js +0 -128
- package/dist/cjs/plugins/analytics/types/inline-comment-events.js +0 -12
- package/dist/cjs/plugins/analytics/types/link-tool-bar-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/media-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/node-events.js +0 -18
- package/dist/cjs/plugins/analytics/utils.js +0 -35
- package/dist/cjs/utils/step.js +0 -24
- package/dist/es2019/plugins/analytics/consts.js +0 -4
- package/dist/es2019/plugins/analytics/index.js +0 -3
- package/dist/es2019/plugins/analytics/plugin-key.js +0 -9
- package/dist/es2019/plugins/analytics/plugin.js +0 -111
- package/dist/es2019/plugins/analytics/types/dispatch-analytics-event.js +0 -1
- package/dist/es2019/plugins/analytics/types/enums.js +0 -1
- package/dist/es2019/plugins/analytics/types/events.js +0 -1
- package/dist/es2019/plugins/analytics/types/extension-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/general-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/index.js +0 -3
- package/dist/es2019/plugins/analytics/types/inline-comment-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/link-tool-bar-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/media-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/node-events.js +0 -1
- package/dist/es2019/plugins/analytics/utils.js +0 -28
- package/dist/es2019/utils/step.js +0 -1
- package/dist/esm/plugins/analytics/consts.js +0 -4
- package/dist/esm/plugins/analytics/index.js +0 -3
- package/dist/esm/plugins/analytics/plugin-key.js +0 -9
- package/dist/esm/plugins/analytics/plugin.js +0 -123
- package/dist/esm/plugins/analytics/types/dispatch-analytics-event.js +0 -1
- package/dist/esm/plugins/analytics/types/enums.js +0 -1
- package/dist/esm/plugins/analytics/types/events.js +0 -1
- package/dist/esm/plugins/analytics/types/extension-events.js +0 -1
- package/dist/esm/plugins/analytics/types/general-events.js +0 -1
- package/dist/esm/plugins/analytics/types/index.js +0 -3
- package/dist/esm/plugins/analytics/types/inline-comment-events.js +0 -1
- package/dist/esm/plugins/analytics/types/link-tool-bar-events.js +0 -1
- package/dist/esm/plugins/analytics/types/media-events.js +0 -1
- package/dist/esm/plugins/analytics/types/node-events.js +0 -1
- package/dist/esm/plugins/analytics/utils.js +0 -29
- package/dist/esm/utils/step.js +0 -1
- package/dist/types/plugins/analytics/consts.d.ts +0 -3
- package/dist/types/plugins/analytics/index.d.ts +0 -3
- package/dist/types/plugins/analytics/plugin-key.d.ts +0 -8
- package/dist/types/plugins/analytics/plugin.d.ts +0 -26
- package/dist/types/plugins/analytics/types/dispatch-analytics-event.d.ts +0 -1
- package/dist/types/plugins/analytics/types/enums.d.ts +0 -1
- package/dist/types/plugins/analytics/types/events.d.ts +0 -1
- package/dist/types/plugins/analytics/types/extension-events.d.ts +0 -2
- package/dist/types/plugins/analytics/types/general-events.d.ts +0 -2
- package/dist/types/plugins/analytics/types/index.d.ts +0 -9
- package/dist/types/plugins/analytics/types/inline-comment-events.d.ts +0 -2
- package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +0 -1
- package/dist/types/plugins/analytics/types/media-events.d.ts +0 -1
- package/dist/types/plugins/analytics/types/node-events.d.ts +0 -2
- package/dist/types/plugins/analytics/utils.d.ts +0 -11
- package/dist/types/utils/step.d.ts +0 -1
- package/dist/types-ts4.5/plugins/analytics/consts.d.ts +0 -3
- package/dist/types-ts4.5/plugins/analytics/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/analytics/plugin-key.d.ts +0 -8
- package/dist/types-ts4.5/plugins/analytics/plugin.d.ts +0 -29
- package/dist/types-ts4.5/plugins/analytics/types/dispatch-analytics-event.d.ts +0 -1
- package/dist/types-ts4.5/plugins/analytics/types/enums.d.ts +0 -1
- package/dist/types-ts4.5/plugins/analytics/types/events.d.ts +0 -1
- package/dist/types-ts4.5/plugins/analytics/types/extension-events.d.ts +0 -2
- package/dist/types-ts4.5/plugins/analytics/types/general-events.d.ts +0 -2
- package/dist/types-ts4.5/plugins/analytics/types/index.d.ts +0 -9
- package/dist/types-ts4.5/plugins/analytics/types/inline-comment-events.d.ts +0 -2
- package/dist/types-ts4.5/plugins/analytics/types/link-tool-bar-events.d.ts +0 -1
- package/dist/types-ts4.5/plugins/analytics/types/media-events.d.ts +0 -1
- package/dist/types-ts4.5/plugins/analytics/types/node-events.d.ts +0 -2
- package/dist/types-ts4.5/plugins/analytics/utils.d.ts +0 -11
- package/dist/types-ts4.5/utils/step.d.ts +0 -1
- /package/dist/cjs/{plugins/extension/ui/styles.js → ui/ContentStyles/extension.js} +0 -0
- /package/dist/es2019/{plugins/extension/ui/styles.js → ui/ContentStyles/extension.js} +0 -0
- /package/dist/esm/{plugins/extension/ui/styles.js → ui/ContentStyles/extension.js} +0 -0
- /package/dist/types/{plugins/extension/ui/styles.d.ts → ui/ContentStyles/extension.d.ts} +0 -0
- /package/dist/types-ts4.5/{plugins/extension/ui/styles.d.ts → ui/ContentStyles/extension.d.ts} +0 -0
|
@@ -1,131 +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.default = void 0;
|
|
8
|
-
exports.extendPayload = extendPayload;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
|
-
var _types = require("./types");
|
|
13
|
-
var _pluginKey = require("./plugin-key");
|
|
14
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
15
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
16
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
function createPlugin(options, featureFlags, pluginInjectionApi) {
|
|
21
|
-
if (!options) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
var hasRequiredPerformanceAPIs = (0, _utils.isPerformanceAPIAvailable)();
|
|
25
|
-
var getCreateAnalyticsEvent = function getCreateAnalyticsEvent() {
|
|
26
|
-
var _pluginInjectionApi$a;
|
|
27
|
-
return pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 || (_pluginInjectionApi$a = _pluginInjectionApi$a.sharedState.currentState()) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.createAnalyticsEvent;
|
|
28
|
-
};
|
|
29
|
-
return new _safePlugin.SafePlugin({
|
|
30
|
-
key: _pluginKey.analyticsPluginKey,
|
|
31
|
-
state: {
|
|
32
|
-
init: function init() {
|
|
33
|
-
var _pluginInjectionApi$a2;
|
|
34
|
-
return _objectSpread(_objectSpread({}, options), {}, {
|
|
35
|
-
createAnalyticsEvent: getCreateAnalyticsEvent(),
|
|
36
|
-
fireAnalytics: (0, _analytics.fireAnalyticsEvent)(options.createAnalyticsEvent),
|
|
37
|
-
editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
apply: function apply(tr, pluginState, _, state) {
|
|
41
|
-
if (pluginState.createAnalyticsEvent !== getCreateAnalyticsEvent()) {
|
|
42
|
-
var _options$createAnalyt;
|
|
43
|
-
// When the plugin state is reconfigured, the init function isn't called again
|
|
44
|
-
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
45
|
-
createAnalyticsEvent: (_options$createAnalyt = options.createAnalyticsEvent) !== null && _options$createAnalyt !== void 0 ? _options$createAnalyt : getCreateAnalyticsEvent()
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
if (featureFlags.catchAllTracking) {
|
|
49
|
-
var analyticsEventWithChannel = (0, _analytics.getAnalyticsEventsFromTransaction)(tr);
|
|
50
|
-
if (analyticsEventWithChannel.length > 0) {
|
|
51
|
-
var _iterator = _createForOfIteratorHelper(analyticsEventWithChannel),
|
|
52
|
-
_step;
|
|
53
|
-
try {
|
|
54
|
-
var _loop = function _loop() {
|
|
55
|
-
var _step$value = _step.value,
|
|
56
|
-
payload = _step$value.payload,
|
|
57
|
-
channel = _step$value.channel;
|
|
58
|
-
// Measures how much time it takes to update the DOM after each ProseMirror document update
|
|
59
|
-
// that has an analytics event.
|
|
60
|
-
if (hasRequiredPerformanceAPIs && tr.docChanged && payload.action !== _types.ACTION.INSERTED && payload.action !== _types.ACTION.DELETED) {
|
|
61
|
-
var measureName = "".concat(payload.actionSubject, ":").concat(payload.action, ":").concat(payload.actionSubjectId);
|
|
62
|
-
(0, _utils.measureRender)(
|
|
63
|
-
// NOTE this name could be resulting in misleading data -- where if multiple payloads are
|
|
64
|
-
// received before a render completes -- the measurement value will be inaccurate (this is
|
|
65
|
-
// due to measureRender requiring unique measureNames)
|
|
66
|
-
measureName, function (_ref) {
|
|
67
|
-
var duration = _ref.duration,
|
|
68
|
-
distortedDuration = _ref.distortedDuration;
|
|
69
|
-
(0, _analytics.fireAnalyticsEvent)(pluginState.createAnalyticsEvent || undefined)({
|
|
70
|
-
payload: extendPayload({
|
|
71
|
-
payload: payload,
|
|
72
|
-
duration: duration,
|
|
73
|
-
distortedDuration: distortedDuration
|
|
74
|
-
}),
|
|
75
|
-
channel: channel
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
81
|
-
_loop();
|
|
82
|
-
}
|
|
83
|
-
} catch (err) {
|
|
84
|
-
_iterator.e(err);
|
|
85
|
-
} finally {
|
|
86
|
-
_iterator.f();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return pluginState;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @private
|
|
98
|
-
* @deprecated
|
|
99
|
-
* Do not use this analytics plugin.
|
|
100
|
-
* This will be deprecated soon.
|
|
101
|
-
*/
|
|
102
|
-
var analyticsPlugin = function analyticsPlugin(_ref2) {
|
|
103
|
-
var _api$featureFlags;
|
|
104
|
-
var options = _ref2.config,
|
|
105
|
-
api = _ref2.api;
|
|
106
|
-
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
107
|
-
return {
|
|
108
|
-
name: 'deprecatedAnalytics',
|
|
109
|
-
pmPlugins: function pmPlugins() {
|
|
110
|
-
return [{
|
|
111
|
-
name: 'analyticsPlugin',
|
|
112
|
-
plugin: function plugin() {
|
|
113
|
-
return createPlugin(options !== null && options !== void 0 ? options : {}, featureFlags, api);
|
|
114
|
-
}
|
|
115
|
-
}];
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
function extendPayload(_ref3) {
|
|
120
|
-
var payload = _ref3.payload,
|
|
121
|
-
duration = _ref3.duration,
|
|
122
|
-
distortedDuration = _ref3.distortedDuration;
|
|
123
|
-
return _objectSpread(_objectSpread({}, payload), {}, {
|
|
124
|
-
attributes: _objectSpread(_objectSpread({}, payload.attributes), {}, {
|
|
125
|
-
duration: duration,
|
|
126
|
-
distortedDuration: distortedDuration
|
|
127
|
-
}),
|
|
128
|
-
eventType: _types.EVENT_TYPE.OPERATIONAL
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
var _default = exports.default = analyticsPlugin;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "ACTION", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _analytics.ACTION;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ACTION_SUBJECT", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _analytics.ACTION_SUBJECT;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "ACTION_SUBJECT_ID", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _analytics.ACTION_SUBJECT_ID;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "CONTENT_COMPONENT", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _analytics.CONTENT_COMPONENT;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "EVENT_TYPE", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _analytics.EVENT_TYPE;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "FLOATING_CONTROLS_TITLE", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _analytics.FLOATING_CONTROLS_TITLE;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "INPUT_METHOD", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _analytics.INPUT_METHOD;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "TRIGGER_METHOD", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _analytics.TRIGGER_METHOD;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "GAP_CURSOR_POSITION", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _analytics.GAP_CURSOR_POSITION;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "SELECTION_TYPE", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _analytics.SELECTION_TYPE;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "TARGET_SELECTION_SOURCE", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _analytics.TARGET_SELECTION_SOURCE;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BROWSER_FREEZE_INTERACTION_TYPE", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _analytics.BROWSER_FREEZE_INTERACTION_TYPE;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "FULL_WIDTH_MODE", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _analytics.FULL_WIDTH_MODE;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "MODE", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _analytics.MODE;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "PLATFORMS", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _analytics.PLATFORMS;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "ACTION", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _enums.ACTION;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ACTION_SUBJECT", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _enums.ACTION_SUBJECT;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "ACTION_SUBJECT_ID", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _enums.ACTION_SUBJECT_ID;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "BROWSER_FREEZE_INTERACTION_TYPE", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _generalEvents.BROWSER_FREEZE_INTERACTION_TYPE;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "CONTENT_COMPONENT", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _enums.CONTENT_COMPONENT;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "DELETE_DIRECTION", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _analytics.DELETE_DIRECTION;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "EVENT_TYPE", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _enums.EVENT_TYPE;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "FLOATING_CONTROLS_TITLE", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _enums.FLOATING_CONTROLS_TITLE;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "FULL_WIDTH_MODE", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _generalEvents.FULL_WIDTH_MODE;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "INDENT_DIRECTION", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function get() {
|
|
63
|
-
return _analytics.INDENT_DIRECTION;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "INDENT_TYPE", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function get() {
|
|
69
|
-
return _analytics.INDENT_TYPE;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "INPUT_METHOD", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function get() {
|
|
75
|
-
return _enums.INPUT_METHOD;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "MODE", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function get() {
|
|
81
|
-
return _generalEvents.MODE;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "PLATFORMS", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function get() {
|
|
87
|
-
return _generalEvents.PLATFORMS;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "PUNC", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function get() {
|
|
93
|
-
return _analytics.PUNC;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "SYMBOL", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function get() {
|
|
99
|
-
return _analytics.SYMBOL;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "TABLE_ACTION", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function get() {
|
|
105
|
-
return _analytics.TABLE_ACTION;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "TABLE_BREAKOUT", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function get() {
|
|
111
|
-
return _analytics.TABLE_BREAKOUT;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "TRIGGER_METHOD", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function get() {
|
|
117
|
-
return _enums.TRIGGER_METHOD;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, "USER_CONTEXT", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function get() {
|
|
123
|
-
return _analytics.USER_CONTEXT;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
var _enums = require("./enums");
|
|
127
|
-
var _generalEvents = require("./general-events");
|
|
128
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "RESOLVE_METHOD", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _analytics.RESOLVE_METHOD;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "LAYOUT_TYPE", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _analytics.LAYOUT_TYPE;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "SMART_LINK_TYPE", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _analytics.SMART_LINK_TYPE;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.addAnalytics = addAnalytics;
|
|
7
|
-
var _consts = require("./consts");
|
|
8
|
-
var _pluginKey = require("./plugin-key");
|
|
9
|
-
function getCreateUIAnalyticsEvent(editorState) {
|
|
10
|
-
var _analyticsPluginKey$g;
|
|
11
|
-
return (_analyticsPluginKey$g = _pluginKey.analyticsPluginKey.getState(editorState)) === null || _analyticsPluginKey$g === void 0 ? void 0 : _analyticsPluginKey$g.createAnalyticsEvent;
|
|
12
|
-
}
|
|
13
|
-
function getEditorAnalyticsAPI(editorState) {
|
|
14
|
-
var _analyticsPluginKey$g2;
|
|
15
|
-
return (_analyticsPluginKey$g2 = _pluginKey.analyticsPluginKey.getState(editorState)) === null || _analyticsPluginKey$g2 === void 0 ? void 0 : _analyticsPluginKey$g2.editorAnalyticsApi;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @deprecated
|
|
22
|
-
*
|
|
23
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
function addAnalytics(state, tr, payload) {
|
|
27
|
-
var channel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _consts.editorAnalyticsChannel;
|
|
28
|
-
var createAnalyticsEvent = getCreateUIAnalyticsEvent(state);
|
|
29
|
-
var editorAnalyticsApi = getEditorAnalyticsAPI(state);
|
|
30
|
-
if (!createAnalyticsEvent || !editorAnalyticsApi) {
|
|
31
|
-
return tr;
|
|
32
|
-
}
|
|
33
|
-
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
|
|
34
|
-
return tr;
|
|
35
|
-
}
|
package/dist/cjs/utils/step.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "extractSliceFromStep", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _utils.extractSliceFromStep;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "stepAddsOneOf", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _utils.stepAddsOneOf;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "stepHasSlice", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _utils.stepHasSlice;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @private
|
|
5
|
-
* @deprecated
|
|
6
|
-
* Do not use the analytics plugin key directly.
|
|
7
|
-
* This will be deprecated soon.
|
|
8
|
-
*/
|
|
9
|
-
export const analyticsPluginKey = new PluginKey('deprecatedAnalyticsPlugin');
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { isPerformanceAPIAvailable, measureRender } from '@atlaskit/editor-common/utils';
|
|
3
|
-
import { ACTION, EVENT_TYPE } from './types';
|
|
4
|
-
import { analyticsPluginKey } from './plugin-key';
|
|
5
|
-
import { fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
function createPlugin(options, featureFlags, pluginInjectionApi) {
|
|
7
|
-
if (!options) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const hasRequiredPerformanceAPIs = isPerformanceAPIAvailable();
|
|
11
|
-
const getCreateAnalyticsEvent = () => {
|
|
12
|
-
var _pluginInjectionApi$a, _pluginInjectionApi$a2;
|
|
13
|
-
return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : (_pluginInjectionApi$a2 = _pluginInjectionApi$a.sharedState.currentState()) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.createAnalyticsEvent;
|
|
14
|
-
};
|
|
15
|
-
return new SafePlugin({
|
|
16
|
-
key: analyticsPluginKey,
|
|
17
|
-
state: {
|
|
18
|
-
init: () => {
|
|
19
|
-
var _pluginInjectionApi$a3;
|
|
20
|
-
return {
|
|
21
|
-
...options,
|
|
22
|
-
createAnalyticsEvent: getCreateAnalyticsEvent(),
|
|
23
|
-
fireAnalytics: fireAnalyticsEvent(options.createAnalyticsEvent),
|
|
24
|
-
editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a3 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.actions
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
apply: (tr, pluginState, _, state) => {
|
|
28
|
-
if (pluginState.createAnalyticsEvent !== getCreateAnalyticsEvent()) {
|
|
29
|
-
var _options$createAnalyt;
|
|
30
|
-
// When the plugin state is reconfigured, the init function isn't called again
|
|
31
|
-
return {
|
|
32
|
-
...pluginState,
|
|
33
|
-
createAnalyticsEvent: (_options$createAnalyt = options.createAnalyticsEvent) !== null && _options$createAnalyt !== void 0 ? _options$createAnalyt : getCreateAnalyticsEvent()
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
if (featureFlags.catchAllTracking) {
|
|
37
|
-
const analyticsEventWithChannel = getAnalyticsEventsFromTransaction(tr);
|
|
38
|
-
if (analyticsEventWithChannel.length > 0) {
|
|
39
|
-
for (const {
|
|
40
|
-
payload,
|
|
41
|
-
channel
|
|
42
|
-
} of analyticsEventWithChannel) {
|
|
43
|
-
// Measures how much time it takes to update the DOM after each ProseMirror document update
|
|
44
|
-
// that has an analytics event.
|
|
45
|
-
if (hasRequiredPerformanceAPIs && tr.docChanged && payload.action !== ACTION.INSERTED && payload.action !== ACTION.DELETED) {
|
|
46
|
-
const measureName = `${payload.actionSubject}:${payload.action}:${payload.actionSubjectId}`;
|
|
47
|
-
measureRender(
|
|
48
|
-
// NOTE this name could be resulting in misleading data -- where if multiple payloads are
|
|
49
|
-
// received before a render completes -- the measurement value will be inaccurate (this is
|
|
50
|
-
// due to measureRender requiring unique measureNames)
|
|
51
|
-
measureName, ({
|
|
52
|
-
duration,
|
|
53
|
-
distortedDuration
|
|
54
|
-
}) => {
|
|
55
|
-
fireAnalyticsEvent(pluginState.createAnalyticsEvent || undefined)({
|
|
56
|
-
payload: extendPayload({
|
|
57
|
-
payload,
|
|
58
|
-
duration,
|
|
59
|
-
distortedDuration
|
|
60
|
-
}),
|
|
61
|
-
channel
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return pluginState;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @private
|
|
76
|
-
* @deprecated
|
|
77
|
-
* Do not use this analytics plugin.
|
|
78
|
-
* This will be deprecated soon.
|
|
79
|
-
*/
|
|
80
|
-
const analyticsPlugin = ({
|
|
81
|
-
config: options,
|
|
82
|
-
api
|
|
83
|
-
}) => {
|
|
84
|
-
var _api$featureFlags;
|
|
85
|
-
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
86
|
-
return {
|
|
87
|
-
name: 'deprecatedAnalytics',
|
|
88
|
-
pmPlugins() {
|
|
89
|
-
return [{
|
|
90
|
-
name: 'analyticsPlugin',
|
|
91
|
-
plugin: () => createPlugin(options !== null && options !== void 0 ? options : {}, featureFlags, api)
|
|
92
|
-
}];
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
export function extendPayload({
|
|
97
|
-
payload,
|
|
98
|
-
duration,
|
|
99
|
-
distortedDuration
|
|
100
|
-
}) {
|
|
101
|
-
return {
|
|
102
|
-
...payload,
|
|
103
|
-
attributes: {
|
|
104
|
-
...payload.attributes,
|
|
105
|
-
duration,
|
|
106
|
-
distortedDuration
|
|
107
|
-
},
|
|
108
|
-
eventType: EVENT_TYPE.OPERATIONAL
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
export default analyticsPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EVENT_TYPE, ACTION, INPUT_METHOD, TRIGGER_METHOD, ACTION_SUBJECT, ACTION_SUBJECT_ID, FLOATING_CONTROLS_TITLE, CONTENT_COMPONENT } from '@atlaskit/editor-common/analytics';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SELECTION_TYPE, GAP_CURSOR_POSITION, TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PLATFORMS, MODE, FULL_WIDTH_MODE, BROWSER_FREEZE_INTERACTION_TYPE } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TRIGGER_METHOD, CONTENT_COMPONENT, FLOATING_CONTROLS_TITLE } from './enums';
|
|
2
|
-
export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS } from './general-events';
|
|
3
|
-
export { USER_CONTEXT, DELETE_DIRECTION, INDENT_DIRECTION, PUNC, TABLE_ACTION, INDENT_TYPE, SYMBOL, TABLE_BREAKOUT } from '@atlaskit/editor-common/analytics';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LAYOUT_TYPE, SMART_LINK_TYPE } from '@atlaskit/editor-common/analytics';
|