@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,28 +0,0 @@
|
|
|
1
|
-
import { editorAnalyticsChannel } from './consts';
|
|
2
|
-
import { analyticsPluginKey } from './plugin-key';
|
|
3
|
-
function getCreateUIAnalyticsEvent(editorState) {
|
|
4
|
-
var _analyticsPluginKey$g;
|
|
5
|
-
return (_analyticsPluginKey$g = analyticsPluginKey.getState(editorState)) === null || _analyticsPluginKey$g === void 0 ? void 0 : _analyticsPluginKey$g.createAnalyticsEvent;
|
|
6
|
-
}
|
|
7
|
-
function getEditorAnalyticsAPI(editorState) {
|
|
8
|
-
var _analyticsPluginKey$g2;
|
|
9
|
-
return (_analyticsPluginKey$g2 = analyticsPluginKey.getState(editorState)) === null || _analyticsPluginKey$g2 === void 0 ? void 0 : _analyticsPluginKey$g2.editorAnalyticsApi;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @private
|
|
15
|
-
* @deprecated
|
|
16
|
-
*
|
|
17
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
export function addAnalytics(state, tr, payload, channel = editorAnalyticsChannel) {
|
|
21
|
-
const createAnalyticsEvent = getCreateUIAnalyticsEvent(state);
|
|
22
|
-
const editorAnalyticsApi = getEditorAnalyticsAPI(state);
|
|
23
|
-
if (!createAnalyticsEvent || !editorAnalyticsApi) {
|
|
24
|
-
return tr;
|
|
25
|
-
}
|
|
26
|
-
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
|
|
27
|
-
return tr;
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { stepHasSlice, stepAddsOneOf, extractSliceFromStep } from '@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 var analyticsPluginKey = new PluginKey('deprecatedAnalyticsPlugin');
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
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; } } }; }
|
|
3
|
-
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); }
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
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) { _defineProperty(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; }
|
|
7
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
|
-
import { isPerformanceAPIAvailable, measureRender } from '@atlaskit/editor-common/utils';
|
|
9
|
-
import { ACTION, EVENT_TYPE } from './types';
|
|
10
|
-
import { analyticsPluginKey } from './plugin-key';
|
|
11
|
-
import { fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
12
|
-
function createPlugin(options, featureFlags, pluginInjectionApi) {
|
|
13
|
-
if (!options) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
var hasRequiredPerformanceAPIs = isPerformanceAPIAvailable();
|
|
17
|
-
var getCreateAnalyticsEvent = function getCreateAnalyticsEvent() {
|
|
18
|
-
var _pluginInjectionApi$a;
|
|
19
|
-
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;
|
|
20
|
-
};
|
|
21
|
-
return new SafePlugin({
|
|
22
|
-
key: analyticsPluginKey,
|
|
23
|
-
state: {
|
|
24
|
-
init: function init() {
|
|
25
|
-
var _pluginInjectionApi$a2;
|
|
26
|
-
return _objectSpread(_objectSpread({}, options), {}, {
|
|
27
|
-
createAnalyticsEvent: getCreateAnalyticsEvent(),
|
|
28
|
-
fireAnalytics: fireAnalyticsEvent(options.createAnalyticsEvent),
|
|
29
|
-
editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
apply: function apply(tr, pluginState, _, state) {
|
|
33
|
-
if (pluginState.createAnalyticsEvent !== getCreateAnalyticsEvent()) {
|
|
34
|
-
var _options$createAnalyt;
|
|
35
|
-
// When the plugin state is reconfigured, the init function isn't called again
|
|
36
|
-
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
37
|
-
createAnalyticsEvent: (_options$createAnalyt = options.createAnalyticsEvent) !== null && _options$createAnalyt !== void 0 ? _options$createAnalyt : getCreateAnalyticsEvent()
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
if (featureFlags.catchAllTracking) {
|
|
41
|
-
var analyticsEventWithChannel = getAnalyticsEventsFromTransaction(tr);
|
|
42
|
-
if (analyticsEventWithChannel.length > 0) {
|
|
43
|
-
var _iterator = _createForOfIteratorHelper(analyticsEventWithChannel),
|
|
44
|
-
_step;
|
|
45
|
-
try {
|
|
46
|
-
var _loop = function _loop() {
|
|
47
|
-
var _step$value = _step.value,
|
|
48
|
-
payload = _step$value.payload,
|
|
49
|
-
channel = _step$value.channel;
|
|
50
|
-
// Measures how much time it takes to update the DOM after each ProseMirror document update
|
|
51
|
-
// that has an analytics event.
|
|
52
|
-
if (hasRequiredPerformanceAPIs && tr.docChanged && payload.action !== ACTION.INSERTED && payload.action !== ACTION.DELETED) {
|
|
53
|
-
var measureName = "".concat(payload.actionSubject, ":").concat(payload.action, ":").concat(payload.actionSubjectId);
|
|
54
|
-
measureRender(
|
|
55
|
-
// NOTE this name could be resulting in misleading data -- where if multiple payloads are
|
|
56
|
-
// received before a render completes -- the measurement value will be inaccurate (this is
|
|
57
|
-
// due to measureRender requiring unique measureNames)
|
|
58
|
-
measureName, function (_ref) {
|
|
59
|
-
var duration = _ref.duration,
|
|
60
|
-
distortedDuration = _ref.distortedDuration;
|
|
61
|
-
fireAnalyticsEvent(pluginState.createAnalyticsEvent || undefined)({
|
|
62
|
-
payload: extendPayload({
|
|
63
|
-
payload: payload,
|
|
64
|
-
duration: duration,
|
|
65
|
-
distortedDuration: distortedDuration
|
|
66
|
-
}),
|
|
67
|
-
channel: channel
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
73
|
-
_loop();
|
|
74
|
-
}
|
|
75
|
-
} catch (err) {
|
|
76
|
-
_iterator.e(err);
|
|
77
|
-
} finally {
|
|
78
|
-
_iterator.f();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return pluginState;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @private
|
|
90
|
-
* @deprecated
|
|
91
|
-
* Do not use this analytics plugin.
|
|
92
|
-
* This will be deprecated soon.
|
|
93
|
-
*/
|
|
94
|
-
var analyticsPlugin = function analyticsPlugin(_ref2) {
|
|
95
|
-
var _api$featureFlags;
|
|
96
|
-
var options = _ref2.config,
|
|
97
|
-
api = _ref2.api;
|
|
98
|
-
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
99
|
-
return {
|
|
100
|
-
name: 'deprecatedAnalytics',
|
|
101
|
-
pmPlugins: function pmPlugins() {
|
|
102
|
-
return [{
|
|
103
|
-
name: 'analyticsPlugin',
|
|
104
|
-
plugin: function plugin() {
|
|
105
|
-
return createPlugin(options !== null && options !== void 0 ? options : {}, featureFlags, api);
|
|
106
|
-
}
|
|
107
|
-
}];
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
export function extendPayload(_ref3) {
|
|
112
|
-
var payload = _ref3.payload,
|
|
113
|
-
duration = _ref3.duration,
|
|
114
|
-
distortedDuration = _ref3.distortedDuration;
|
|
115
|
-
return _objectSpread(_objectSpread({}, payload), {}, {
|
|
116
|
-
attributes: _objectSpread(_objectSpread({}, payload.attributes), {}, {
|
|
117
|
-
duration: duration,
|
|
118
|
-
distortedDuration: distortedDuration
|
|
119
|
-
}),
|
|
120
|
-
eventType: EVENT_TYPE.OPERATIONAL
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
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';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { editorAnalyticsChannel } from './consts';
|
|
2
|
-
import { analyticsPluginKey } from './plugin-key';
|
|
3
|
-
function getCreateUIAnalyticsEvent(editorState) {
|
|
4
|
-
var _analyticsPluginKey$g;
|
|
5
|
-
return (_analyticsPluginKey$g = analyticsPluginKey.getState(editorState)) === null || _analyticsPluginKey$g === void 0 ? void 0 : _analyticsPluginKey$g.createAnalyticsEvent;
|
|
6
|
-
}
|
|
7
|
-
function getEditorAnalyticsAPI(editorState) {
|
|
8
|
-
var _analyticsPluginKey$g2;
|
|
9
|
-
return (_analyticsPluginKey$g2 = analyticsPluginKey.getState(editorState)) === null || _analyticsPluginKey$g2 === void 0 ? void 0 : _analyticsPluginKey$g2.editorAnalyticsApi;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @private
|
|
15
|
-
* @deprecated
|
|
16
|
-
*
|
|
17
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
export function addAnalytics(state, tr, payload) {
|
|
21
|
-
var channel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : editorAnalyticsChannel;
|
|
22
|
-
var createAnalyticsEvent = getCreateUIAnalyticsEvent(state);
|
|
23
|
-
var editorAnalyticsApi = getEditorAnalyticsAPI(state);
|
|
24
|
-
if (!createAnalyticsEvent || !editorAnalyticsApi) {
|
|
25
|
-
return tr;
|
|
26
|
-
}
|
|
27
|
-
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
|
|
28
|
-
return tr;
|
|
29
|
-
}
|
package/dist/esm/utils/step.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { stepHasSlice, stepAddsOneOf, extractSliceFromStep } from '@atlaskit/editor-common/utils';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { AnalyticsEventPayload } from './types';
|
|
4
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
-
import type { PerformanceTracking } from '../../types/performance-tracking';
|
|
6
|
-
import type { analyticsPlugin as newAnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
|
-
interface AnalyticsPluginOptions {
|
|
8
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
9
|
-
performanceTracking?: PerformanceTracking;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* @deprecated
|
|
14
|
-
* Do not use this analytics plugin.
|
|
15
|
-
* This will be deprecated soon.
|
|
16
|
-
*/
|
|
17
|
-
declare const analyticsPlugin: NextEditorPlugin<'deprecatedAnalytics', {
|
|
18
|
-
pluginConfiguration: AnalyticsPluginOptions;
|
|
19
|
-
dependencies: [FeatureFlagsPlugin, typeof newAnalyticsPlugin];
|
|
20
|
-
}>;
|
|
21
|
-
export declare function extendPayload({ payload, duration, distortedDuration, }: {
|
|
22
|
-
payload: AnalyticsEventPayload;
|
|
23
|
-
duration: number;
|
|
24
|
-
distortedDuration: boolean;
|
|
25
|
-
}): AnalyticsEventPayload<void>;
|
|
26
|
-
export default analyticsPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -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 type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, FeatureExposureAEP, TransactionEventPayload, ErrorEventAttributes, ErrorEventPayload, } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,9 +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 type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, AnalyticsEventPayloadCallback, ErrorEventPayload, ErrorEventAttributes, } from './events';
|
|
3
|
-
export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS, } from './general-events';
|
|
4
|
-
export type { GeneralEventPayload } from './general-events';
|
|
5
|
-
export type { MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, } from './media-events';
|
|
6
|
-
export type { DispatchAnalyticsEvent } from './dispatch-analytics-event';
|
|
7
|
-
export type { CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, } from './link-tool-bar-events';
|
|
8
|
-
export type { FormatEventPayload, CommonListAnalyticsAttributes, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, ListEventPayload, PasteContent, PasteEventPayload, PasteSource, PasteType, PasteContents, SubstituteEventPayload, TableEventPayload, PasteSources, PasteTypes, PASTE_ACTION_SUBJECT_ID, } from '@atlaskit/editor-common/analytics';
|
|
9
|
-
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 type { RecentActivitiesPerfAEP, QuickSearchPerfAEP, ViewedCreateLinkInlineDialogAEP, DismissedCreateLinkInlineDialogAEP, EnteredTextLinkSearchInputAEP, ShownPreQuerySearchResultsAEP, ShownPostQuerySearchResultsAEP, HighlightedSearchResultsAEP, SelectedSearchResultsAEP, EditLinkToolbarAEP, UnlinkToolbarAEP, CreateLinkInlineDialogEventPayload, CreateLinkInlineDialogActionType, } from '@atlaskit/editor-common/analytics';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { MediaLinkAEP, CaptionTrackAction, MediaAltTextActionType, MediaEventPayload, } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { AnalyticsEventPayload } from './types';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @private
|
|
6
|
-
* @deprecated
|
|
7
|
-
*
|
|
8
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { stepHasSlice, stepAddsOneOf, extractSliceFromStep, } from '@atlaskit/editor-common/utils';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { AnalyticsEventPayload } from './types';
|
|
4
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
-
import type { PerformanceTracking } from '../../types/performance-tracking';
|
|
6
|
-
import type { analyticsPlugin as newAnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
|
-
interface AnalyticsPluginOptions {
|
|
8
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
9
|
-
performanceTracking?: PerformanceTracking;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* @deprecated
|
|
14
|
-
* Do not use this analytics plugin.
|
|
15
|
-
* This will be deprecated soon.
|
|
16
|
-
*/
|
|
17
|
-
declare const analyticsPlugin: NextEditorPlugin<'deprecatedAnalytics', {
|
|
18
|
-
pluginConfiguration: AnalyticsPluginOptions;
|
|
19
|
-
dependencies: [
|
|
20
|
-
FeatureFlagsPlugin,
|
|
21
|
-
typeof newAnalyticsPlugin
|
|
22
|
-
];
|
|
23
|
-
}>;
|
|
24
|
-
export declare function extendPayload({ payload, duration, distortedDuration, }: {
|
|
25
|
-
payload: AnalyticsEventPayload;
|
|
26
|
-
duration: number;
|
|
27
|
-
distortedDuration: boolean;
|
|
28
|
-
}): AnalyticsEventPayload<void>;
|
|
29
|
-
export default analyticsPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -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 type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, FeatureExposureAEP, TransactionEventPayload, ErrorEventAttributes, ErrorEventPayload, } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,9 +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 type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, AnalyticsEventPayloadCallback, ErrorEventPayload, ErrorEventAttributes, } from './events';
|
|
3
|
-
export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS, } from './general-events';
|
|
4
|
-
export type { GeneralEventPayload } from './general-events';
|
|
5
|
-
export type { MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, } from './media-events';
|
|
6
|
-
export type { DispatchAnalyticsEvent } from './dispatch-analytics-event';
|
|
7
|
-
export type { CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, } from './link-tool-bar-events';
|
|
8
|
-
export type { FormatEventPayload, CommonListAnalyticsAttributes, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, ListEventPayload, PasteContent, PasteEventPayload, PasteSource, PasteType, PasteContents, SubstituteEventPayload, TableEventPayload, PasteSources, PasteTypes, PASTE_ACTION_SUBJECT_ID, } from '@atlaskit/editor-common/analytics';
|
|
9
|
-
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 type { RecentActivitiesPerfAEP, QuickSearchPerfAEP, ViewedCreateLinkInlineDialogAEP, DismissedCreateLinkInlineDialogAEP, EnteredTextLinkSearchInputAEP, ShownPreQuerySearchResultsAEP, ShownPostQuerySearchResultsAEP, HighlightedSearchResultsAEP, SelectedSearchResultsAEP, EditLinkToolbarAEP, UnlinkToolbarAEP, CreateLinkInlineDialogEventPayload, CreateLinkInlineDialogActionType, } from '@atlaskit/editor-common/analytics';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { MediaLinkAEP, CaptionTrackAction, MediaAltTextActionType, MediaEventPayload, } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { AnalyticsEventPayload } from './types';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @private
|
|
6
|
-
* @deprecated
|
|
7
|
-
*
|
|
8
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { stepHasSlice, stepAddsOneOf, extractSliceFromStep, } from '@atlaskit/editor-common/utils';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types-ts4.5/{plugins/extension/ui/styles.d.ts → ui/ContentStyles/extension.d.ts}
RENAMED
|
File without changes
|