@atlaskit/editor-core 189.3.14 → 189.3.15
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 +10 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/analytics/index.js +0 -6
- package/dist/cjs/plugins/analytics/utils.js +0 -29
- package/dist/cjs/plugins/breakout/index.js +3 -3
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -4
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
- package/dist/cjs/plugins/find-replace/commands-with-analytics.js +85 -71
- package/dist/cjs/plugins/find-replace/index.js +5 -2
- package/dist/cjs/plugins/find-replace/keymap.js +4 -4
- package/dist/cjs/plugins/index.js +1 -17
- package/dist/cjs/presets/context.js +5 -3
- package/dist/cjs/presets/universal.js +12 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/cjs/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +11 -8
- package/dist/cjs/ui/ContentStyles/index.js +4 -4
- package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
- package/dist/cjs/use-preset.js +0 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/es2019/plugins/analytics/index.js +1 -1
- package/dist/es2019/plugins/analytics/utils.js +0 -24
- package/dist/es2019/plugins/breakout/index.js +1 -1
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -1
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +20 -19
- package/dist/es2019/plugins/find-replace/commands-with-analytics.js +15 -15
- package/dist/es2019/plugins/find-replace/index.js +7 -2
- package/dist/es2019/plugins/find-replace/keymap.js +4 -4
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/presets/context.js +2 -2
- package/dist/es2019/presets/universal.js +10 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/es2019/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ToolbarFeedback/index.js +2 -2
- package/dist/es2019/use-preset.js +0 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/esm/plugins/analytics/utils.js +0 -28
- package/dist/esm/plugins/breakout/index.js +1 -1
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -1
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
- package/dist/esm/plugins/find-replace/commands-with-analytics.js +84 -70
- package/dist/esm/plugins/find-replace/index.js +5 -2
- package/dist/esm/plugins/find-replace/keymap.js +4 -4
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/presets/context.js +2 -2
- package/dist/esm/presets/universal.js +9 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/esm/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/use-preset.js +0 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/analytics/index.d.ts +1 -1
- package/dist/types/plugins/analytics/utils.d.ts +0 -11
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
- package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +9 -9
- package/dist/types/plugins/find-replace/index.d.ts +5 -3
- package/dist/types/plugins/find-replace/keymap.d.ts +2 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +1 -1
- package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -1
- package/dist/types/presets/context.d.ts +2 -2
- package/dist/types/presets/universal.d.ts +5 -0
- package/dist/types/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
- package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/analytics/utils.d.ts +0 -11
- package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
- package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +9 -9
- package/dist/types-ts4.5/plugins/find-replace/index.d.ts +6 -3
- package/dist/types-ts4.5/plugins/find-replace/keymap.d.ts +2 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/mobile-dimensions/index.d.ts +2 -1
- package/dist/types-ts4.5/presets/context.d.ts +2 -2
- package/dist/types-ts4.5/presets/universal.d.ts +5 -0
- package/dist/types-ts4.5/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
- package/package.json +3 -7
- package/dist/cjs/plugins/breakout/constants.js +0 -10
- package/dist/cjs/plugins/expand/commands.js +0 -184
- package/dist/cjs/plugins/expand/index.js +0 -111
- package/dist/cjs/plugins/expand/nodeviews/index.js +0 -485
- package/dist/cjs/plugins/expand/pm-plugins/keymap.js +0 -171
- package/dist/cjs/plugins/expand/pm-plugins/main.js +0 -85
- package/dist/cjs/plugins/expand/pm-plugins/plugin-factory.js +0 -15
- package/dist/cjs/plugins/expand/reducer.js +0 -20
- package/dist/cjs/plugins/expand/toolbar.js +0 -59
- package/dist/cjs/plugins/expand/types.js +0 -5
- package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +0 -104
- package/dist/cjs/plugins/expand/ui/class-names.js +0 -20
- package/dist/cjs/plugins/expand/utils.js +0 -24
- package/dist/es2019/plugins/breakout/constants.js +0 -4
- package/dist/es2019/plugins/expand/commands.js +0 -161
- package/dist/es2019/plugins/expand/index.js +0 -95
- package/dist/es2019/plugins/expand/nodeviews/index.js +0 -475
- package/dist/es2019/plugins/expand/pm-plugins/keymap.js +0 -197
- package/dist/es2019/plugins/expand/pm-plugins/main.js +0 -73
- package/dist/es2019/plugins/expand/pm-plugins/plugin-factory.js +0 -9
- package/dist/es2019/plugins/expand/reducer.js +0 -11
- package/dist/es2019/plugins/expand/toolbar.js +0 -52
- package/dist/es2019/plugins/expand/types.js +0 -1
- package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +0 -85
- package/dist/es2019/plugins/expand/ui/class-names.js +0 -12
- package/dist/es2019/plugins/expand/utils.js +0 -1
- package/dist/esm/plugins/breakout/constants.js +0 -4
- package/dist/esm/plugins/expand/commands.js +0 -177
- package/dist/esm/plugins/expand/index.js +0 -97
- package/dist/esm/plugins/expand/nodeviews/index.js +0 -477
- package/dist/esm/plugins/expand/pm-plugins/keymap.js +0 -165
- package/dist/esm/plugins/expand/pm-plugins/main.js +0 -77
- package/dist/esm/plugins/expand/pm-plugins/plugin-factory.js +0 -9
- package/dist/esm/plugins/expand/reducer.js +0 -13
- package/dist/esm/plugins/expand/toolbar.js +0 -52
- package/dist/esm/plugins/expand/types.js +0 -1
- package/dist/esm/plugins/expand/ui/ExpandIconButton.js +0 -95
- package/dist/esm/plugins/expand/ui/class-names.js +0 -14
- package/dist/esm/plugins/expand/utils.js +0 -1
- package/dist/types/plugins/breakout/constants.d.ts +0 -4
- package/dist/types/plugins/expand/commands.d.ts +0 -13
- package/dist/types/plugins/expand/index.d.ts +0 -31
- package/dist/types/plugins/expand/nodeviews/index.d.ts +0 -55
- package/dist/types/plugins/expand/pm-plugins/keymap.d.ts +0 -4
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +0 -8
- package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
- package/dist/types/plugins/expand/reducer.d.ts +0 -3
- package/dist/types/plugins/expand/toolbar.d.ts +0 -3
- package/dist/types/plugins/expand/types.d.ts +0 -9
- package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
- package/dist/types/plugins/expand/ui/class-names.d.ts +0 -11
- package/dist/types/plugins/expand/utils.d.ts +0 -1
- package/dist/types-ts4.5/plugins/breakout/constants.d.ts +0 -4
- package/dist/types-ts4.5/plugins/expand/commands.d.ts +0 -13
- package/dist/types-ts4.5/plugins/expand/index.d.ts +0 -31
- package/dist/types-ts4.5/plugins/expand/nodeviews/index.d.ts +0 -55
- package/dist/types-ts4.5/plugins/expand/pm-plugins/keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/expand/pm-plugins/main.d.ts +0 -8
- package/dist/types-ts4.5/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/reducer.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/types.d.ts +0 -9
- package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
- package/dist/types-ts4.5/plugins/expand/ui/class-names.d.ts +0 -11
- package/dist/types-ts4.5/plugins/expand/utils.d.ts +0 -1
|
@@ -8,10 +8,10 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
8
8
|
import { breakout } from '@atlaskit/adf-schema';
|
|
9
9
|
import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import LayoutButton from './ui/LayoutButton';
|
|
11
|
-
import { BreakoutCssClassName } from './constants';
|
|
12
11
|
import { pluginKey } from './plugin-key';
|
|
13
12
|
import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
|
|
14
13
|
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
14
|
+
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
15
15
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
16
16
|
var BreakoutView = /*#__PURE__*/function () {
|
|
17
17
|
function BreakoutView(
|
|
@@ -22,7 +22,7 @@ import ToolbarButton from '../../../ui/ToolbarButton';
|
|
|
22
22
|
import { getBreakoutMode } from '../utils/get-breakout-mode';
|
|
23
23
|
import { setBreakoutMode } from '../commands/set-breakout-mode';
|
|
24
24
|
import { removeBreakout } from '../commands/remove-breakout';
|
|
25
|
-
import { BreakoutCssClassName } from '
|
|
25
|
+
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
26
26
|
import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
|
|
27
27
|
import { getPluginState } from '../plugin-key';
|
|
28
28
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -5,15 +5,17 @@ import { cancelSearchWithAnalytics, replaceWithAnalytics, replaceAllWithAnalytic
|
|
|
5
5
|
import { blur, toggleMatchCase } from './commands';
|
|
6
6
|
import FindReplaceToolbarButton from './ui/FindReplaceToolbarButton';
|
|
7
7
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithState(
|
|
9
|
-
var popupsBoundariesElement =
|
|
10
|
-
popupsMountPoint =
|
|
11
|
-
popupsScrollableElement =
|
|
12
|
-
isToolbarReducedSpacing =
|
|
13
|
-
editorView =
|
|
14
|
-
containerElement =
|
|
15
|
-
dispatchAnalyticsEvent =
|
|
16
|
-
featureFlags =
|
|
8
|
+
var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithState(_ref) {
|
|
9
|
+
var popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
10
|
+
popupsMountPoint = _ref.popupsMountPoint,
|
|
11
|
+
popupsScrollableElement = _ref.popupsScrollableElement,
|
|
12
|
+
isToolbarReducedSpacing = _ref.isToolbarReducedSpacing,
|
|
13
|
+
editorView = _ref.editorView,
|
|
14
|
+
containerElement = _ref.containerElement,
|
|
15
|
+
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
16
|
+
featureFlags = _ref.featureFlags,
|
|
17
|
+
editorAnalyticsAPI = _ref.editorAnalyticsAPI,
|
|
18
|
+
takeFullWidth = _ref.takeFullWidth;
|
|
17
19
|
if (!editorView) {
|
|
18
20
|
return null;
|
|
19
21
|
}
|
|
@@ -34,50 +36,50 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
34
36
|
};
|
|
35
37
|
var handleActivate = function handleActivate() {
|
|
36
38
|
runWithEditorFocused(function () {
|
|
37
|
-
return dispatchCommand(activateWithAnalytics({
|
|
39
|
+
return dispatchCommand(activateWithAnalytics(editorAnalyticsAPI)({
|
|
38
40
|
triggerMethod: TRIGGER_METHOD.TOOLBAR
|
|
39
41
|
}));
|
|
40
42
|
});
|
|
41
43
|
};
|
|
42
44
|
var handleFind = function handleFind(keyword) {
|
|
43
45
|
runWithEditorFocused(function () {
|
|
44
|
-
return dispatchCommand(findWithAnalytics({
|
|
46
|
+
return dispatchCommand(findWithAnalytics(editorAnalyticsAPI)({
|
|
45
47
|
editorView: editorView,
|
|
46
48
|
containerElement: containerElement,
|
|
47
49
|
keyword: keyword
|
|
48
50
|
}));
|
|
49
51
|
});
|
|
50
52
|
};
|
|
51
|
-
var handleFindNext = function handleFindNext(
|
|
52
|
-
var triggerMethod =
|
|
53
|
+
var handleFindNext = function handleFindNext(_ref2) {
|
|
54
|
+
var triggerMethod = _ref2.triggerMethod;
|
|
53
55
|
runWithEditorFocused(function () {
|
|
54
|
-
return dispatchCommand(findNextWithAnalytics({
|
|
56
|
+
return dispatchCommand(findNextWithAnalytics(editorAnalyticsAPI)({
|
|
55
57
|
triggerMethod: triggerMethod
|
|
56
58
|
}));
|
|
57
59
|
});
|
|
58
60
|
};
|
|
59
|
-
var handleFindPrev = function handleFindPrev(
|
|
60
|
-
var triggerMethod =
|
|
61
|
+
var handleFindPrev = function handleFindPrev(_ref3) {
|
|
62
|
+
var triggerMethod = _ref3.triggerMethod;
|
|
61
63
|
runWithEditorFocused(function () {
|
|
62
|
-
return dispatchCommand(findPrevWithAnalytics({
|
|
64
|
+
return dispatchCommand(findPrevWithAnalytics(editorAnalyticsAPI)({
|
|
63
65
|
triggerMethod: triggerMethod
|
|
64
66
|
}));
|
|
65
67
|
});
|
|
66
68
|
};
|
|
67
|
-
var handleReplace = function handleReplace(
|
|
68
|
-
var triggerMethod =
|
|
69
|
-
replaceText =
|
|
69
|
+
var handleReplace = function handleReplace(_ref4) {
|
|
70
|
+
var triggerMethod = _ref4.triggerMethod,
|
|
71
|
+
replaceText = _ref4.replaceText;
|
|
70
72
|
runWithEditorFocused(function () {
|
|
71
|
-
return dispatchCommand(replaceWithAnalytics({
|
|
73
|
+
return dispatchCommand(replaceWithAnalytics(editorAnalyticsAPI)({
|
|
72
74
|
triggerMethod: triggerMethod,
|
|
73
75
|
replaceText: replaceText
|
|
74
76
|
}));
|
|
75
77
|
});
|
|
76
78
|
};
|
|
77
|
-
var handleReplaceAll = function handleReplaceAll(
|
|
78
|
-
var replaceText =
|
|
79
|
+
var handleReplaceAll = function handleReplaceAll(_ref5) {
|
|
80
|
+
var replaceText = _ref5.replaceText;
|
|
79
81
|
runWithEditorFocused(function () {
|
|
80
|
-
return dispatchCommand(replaceAllWithAnalytics({
|
|
82
|
+
return dispatchCommand(replaceAllWithAnalytics(editorAnalyticsAPI)({
|
|
81
83
|
replaceText: replaceText
|
|
82
84
|
}));
|
|
83
85
|
});
|
|
@@ -85,9 +87,9 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
85
87
|
var handleFindBlur = function handleFindBlur() {
|
|
86
88
|
dispatchCommand(blur());
|
|
87
89
|
};
|
|
88
|
-
var handleCancel = function handleCancel(
|
|
89
|
-
var triggerMethod =
|
|
90
|
-
dispatchCommand(cancelSearchWithAnalytics({
|
|
90
|
+
var handleCancel = function handleCancel(_ref6) {
|
|
91
|
+
var triggerMethod = _ref6.triggerMethod;
|
|
92
|
+
dispatchCommand(cancelSearchWithAnalytics(editorAnalyticsAPI)({
|
|
91
93
|
triggerMethod: triggerMethod
|
|
92
94
|
}));
|
|
93
95
|
editorView.focus();
|
|
@@ -101,8 +103,8 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
101
103
|
plugins: {
|
|
102
104
|
findReplaceState: findReplacePluginKey
|
|
103
105
|
},
|
|
104
|
-
render: function render(
|
|
105
|
-
var findReplaceState =
|
|
106
|
+
render: function render(_ref7) {
|
|
107
|
+
var findReplaceState = _ref7.findReplaceState;
|
|
106
108
|
if (!findReplaceState) {
|
|
107
109
|
return null;
|
|
108
110
|
}
|
|
@@ -129,7 +131,7 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
129
131
|
onFindPrev: handleFindPrev,
|
|
130
132
|
onReplace: handleReplace,
|
|
131
133
|
onReplaceAll: handleReplaceAll,
|
|
132
|
-
takeFullWidth: !!
|
|
134
|
+
takeFullWidth: !!takeFullWidth
|
|
133
135
|
});
|
|
134
136
|
}
|
|
135
137
|
});
|
|
@@ -1,81 +1,95 @@
|
|
|
1
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { withAnalytics } from '../analytics';
|
|
3
2
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
4
4
|
import { activate, find, findNext, findPrevious, replace, replaceAll, cancelSearch } from './commands';
|
|
5
|
-
export var activateWithAnalytics = function activateWithAnalytics(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export var activateWithAnalytics = function activateWithAnalytics(editorAnalyticsAPI) {
|
|
6
|
+
return function (_ref) {
|
|
7
|
+
var triggerMethod = _ref.triggerMethod;
|
|
8
|
+
return withAnalytics(editorAnalyticsAPI, function (state) {
|
|
9
|
+
return {
|
|
10
|
+
eventType: EVENT_TYPE.UI,
|
|
11
|
+
action: ACTION.ACTIVATED,
|
|
12
|
+
actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
|
|
13
|
+
attributes: {
|
|
14
|
+
inputMethod: state.selection instanceof TextSelection && !state.selection.empty ? INPUT_METHOD.PREFILL : INPUT_METHOD.KEYBOARD,
|
|
15
|
+
triggerMethod: triggerMethod
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
})(activate());
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export var findWithAnalytics = function findWithAnalytics(editorAnalyticsAPI) {
|
|
22
|
+
return function (_ref2) {
|
|
23
|
+
var editorView = _ref2.editorView,
|
|
24
|
+
containerElement = _ref2.containerElement,
|
|
25
|
+
keyword = _ref2.keyword;
|
|
26
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
27
|
+
eventType: EVENT_TYPE.TRACK,
|
|
28
|
+
action: ACTION.FIND_PERFORMED,
|
|
29
|
+
actionSubject: ACTION_SUBJECT.TEXT
|
|
30
|
+
})(find(editorView, containerElement, keyword));
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export var findNextWithAnalytics = function findNextWithAnalytics(editorAnalyticsAPI) {
|
|
34
|
+
return function (_ref3) {
|
|
35
|
+
var triggerMethod = _ref3.triggerMethod;
|
|
36
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
37
|
+
eventType: EVENT_TYPE.TRACK,
|
|
38
|
+
action: ACTION.FIND_NEXT_PERFORMED,
|
|
39
|
+
actionSubject: ACTION_SUBJECT.TEXT,
|
|
12
40
|
attributes: {
|
|
13
|
-
inputMethod: state.selection instanceof TextSelection && !state.selection.empty ? INPUT_METHOD.PREFILL : INPUT_METHOD.KEYBOARD,
|
|
14
41
|
triggerMethod: triggerMethod
|
|
15
42
|
}
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export var findWithAnalytics = function findWithAnalytics(_ref2) {
|
|
20
|
-
var editorView = _ref2.editorView,
|
|
21
|
-
containerElement = _ref2.containerElement,
|
|
22
|
-
keyword = _ref2.keyword;
|
|
23
|
-
return withAnalytics({
|
|
24
|
-
eventType: EVENT_TYPE.TRACK,
|
|
25
|
-
action: ACTION.FIND_PERFORMED,
|
|
26
|
-
actionSubject: ACTION_SUBJECT.TEXT
|
|
27
|
-
})(find(editorView, containerElement, keyword));
|
|
43
|
+
})(findNext());
|
|
44
|
+
};
|
|
28
45
|
};
|
|
29
|
-
export var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var triggerMethod = _ref4.triggerMethod;
|
|
42
|
-
return withAnalytics({
|
|
43
|
-
eventType: EVENT_TYPE.TRACK,
|
|
44
|
-
action: ACTION.FIND_PREV_PERFORMED,
|
|
45
|
-
actionSubject: ACTION_SUBJECT.TEXT,
|
|
46
|
-
attributes: {
|
|
47
|
-
triggerMethod: triggerMethod
|
|
48
|
-
}
|
|
49
|
-
})(findPrevious());
|
|
46
|
+
export var findPrevWithAnalytics = function findPrevWithAnalytics(editorAnalyticsAPI) {
|
|
47
|
+
return function (_ref4) {
|
|
48
|
+
var triggerMethod = _ref4.triggerMethod;
|
|
49
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
50
|
+
eventType: EVENT_TYPE.TRACK,
|
|
51
|
+
action: ACTION.FIND_PREV_PERFORMED,
|
|
52
|
+
actionSubject: ACTION_SUBJECT.TEXT,
|
|
53
|
+
attributes: {
|
|
54
|
+
triggerMethod: triggerMethod
|
|
55
|
+
}
|
|
56
|
+
})(findPrevious());
|
|
57
|
+
};
|
|
50
58
|
};
|
|
51
|
-
export var replaceWithAnalytics = function replaceWithAnalytics(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
export var replaceWithAnalytics = function replaceWithAnalytics(editorAnalyticsAPI) {
|
|
60
|
+
return function (_ref5) {
|
|
61
|
+
var triggerMethod = _ref5.triggerMethod,
|
|
62
|
+
replaceText = _ref5.replaceText;
|
|
63
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
64
|
+
eventType: EVENT_TYPE.TRACK,
|
|
65
|
+
action: ACTION.REPLACED_ONE,
|
|
66
|
+
actionSubject: ACTION_SUBJECT.TEXT,
|
|
67
|
+
attributes: {
|
|
68
|
+
triggerMethod: triggerMethod
|
|
69
|
+
}
|
|
70
|
+
})(replace(replaceText));
|
|
71
|
+
};
|
|
62
72
|
};
|
|
63
|
-
export var replaceAllWithAnalytics = function replaceAllWithAnalytics(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
export var replaceAllWithAnalytics = function replaceAllWithAnalytics(editorAnalyticsAPI) {
|
|
74
|
+
return function (_ref6) {
|
|
75
|
+
var replaceText = _ref6.replaceText;
|
|
76
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
77
|
+
eventType: EVENT_TYPE.TRACK,
|
|
78
|
+
action: ACTION.REPLACED_ALL,
|
|
79
|
+
actionSubject: ACTION_SUBJECT.TEXT
|
|
80
|
+
})(replaceAll(replaceText));
|
|
81
|
+
};
|
|
70
82
|
};
|
|
71
|
-
export var cancelSearchWithAnalytics = function cancelSearchWithAnalytics(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
export var cancelSearchWithAnalytics = function cancelSearchWithAnalytics(editorAnalyticsAPI) {
|
|
84
|
+
return function (_ref7) {
|
|
85
|
+
var triggerMethod = _ref7.triggerMethod;
|
|
86
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
87
|
+
eventType: EVENT_TYPE.UI,
|
|
88
|
+
action: ACTION.DEACTIVATED,
|
|
89
|
+
actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
|
|
90
|
+
attributes: {
|
|
91
|
+
triggerMethod: triggerMethod
|
|
92
|
+
}
|
|
93
|
+
})(cancelSearch());
|
|
94
|
+
};
|
|
81
95
|
};
|
|
@@ -19,7 +19,8 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
19
19
|
}, {
|
|
20
20
|
name: 'findReplaceKeymap',
|
|
21
21
|
plugin: function plugin() {
|
|
22
|
-
|
|
22
|
+
var _api$analytics;
|
|
23
|
+
return keymapPlugin(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
23
24
|
}
|
|
24
25
|
}];
|
|
25
26
|
},
|
|
@@ -34,6 +35,7 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
34
35
|
if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
|
|
35
36
|
return null;
|
|
36
37
|
} else {
|
|
38
|
+
var _api$analytics2;
|
|
37
39
|
return /*#__PURE__*/React.createElement(FindReplaceToolbarButtonWithState, {
|
|
38
40
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
39
41
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -43,7 +45,8 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
43
45
|
containerElement: containerElement,
|
|
44
46
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
45
47
|
takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
|
|
46
|
-
featureFlags: featureFlags
|
|
48
|
+
featureFlags: featureFlags,
|
|
49
|
+
editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
}
|
|
@@ -2,17 +2,17 @@ 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
4
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
var activateFindReplace = function activateFindReplace() {
|
|
5
|
+
var activateFindReplace = function activateFindReplace(editorAnalyticsAPI) {
|
|
6
6
|
return function (state, dispatch) {
|
|
7
|
-
activateWithAnalytics({
|
|
7
|
+
activateWithAnalytics(editorAnalyticsAPI)({
|
|
8
8
|
triggerMethod: TRIGGER_METHOD.SHORTCUT
|
|
9
9
|
})(state, dispatch);
|
|
10
10
|
return true;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
var keymapPlugin = function keymapPlugin() {
|
|
13
|
+
var keymapPlugin = function keymapPlugin(editorAnalyticsAPI) {
|
|
14
14
|
var list = {};
|
|
15
|
-
bindKeymapWithCommand(findKeymap.common, activateFindReplace(), list);
|
|
15
|
+
bindKeymapWithCommand(findKeymap.common, activateFindReplace(editorAnalyticsAPI), list);
|
|
16
16
|
return keymap(list);
|
|
17
17
|
};
|
|
18
18
|
export default keymapPlugin;
|
|
@@ -15,7 +15,6 @@ export { default as annotationPlugin } from './annotation';
|
|
|
15
15
|
export { default as analyticsPlugin } from './analytics';
|
|
16
16
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
17
17
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
18
|
-
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
19
18
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
20
19
|
export { default as findReplacePlugin } from './find-replace';
|
|
21
20
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -14,11 +14,11 @@ export var PresetContextProvider = function PresetContextProvider(_ref) {
|
|
|
14
14
|
}
|
|
15
15
|
}, children);
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export function usePresetContext() {
|
|
18
18
|
var _useContext = useContext(EditorAPIContext),
|
|
19
19
|
editorApi = _useContext.editorApi;
|
|
20
20
|
return editorApi;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
export var useSetPresetContext = function useSetPresetContext() {
|
|
23
23
|
var _useContext2 = useContext(EditorAPIContext),
|
|
24
24
|
setEditorApi = _useContext2.setEditorApi;
|
|
@@ -2,7 +2,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin,
|
|
5
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
6
6
|
import { panelPlugin } from '@atlaskit/editor-plugin-panel';
|
|
7
7
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
8
8
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
@@ -31,6 +31,7 @@ import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
|
31
31
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
32
32
|
import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
33
33
|
import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
34
|
+
import { expandPlugin } from '@atlaskit/editor-plugin-expand';
|
|
34
35
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
35
36
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
36
37
|
import { createDefaultPreset } from './default';
|
|
@@ -412,4 +413,11 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
412
413
|
appearance: appearance
|
|
413
414
|
}]);
|
|
414
415
|
return finalPreset;
|
|
416
|
+
}
|
|
417
|
+
export function isExpandInsertionEnabled(_ref) {
|
|
418
|
+
var allowExpand = _ref.allowExpand;
|
|
419
|
+
if (allowExpand && _typeof(allowExpand) === 'object') {
|
|
420
|
+
return !!allowExpand.allowInsertion;
|
|
421
|
+
}
|
|
422
|
+
return false;
|
|
415
423
|
}
|
|
@@ -203,7 +203,7 @@ function RenderWithPluginState(_ref4) {
|
|
|
203
203
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
204
204
|
return jsx(Fragment, null, renderChrome({
|
|
205
205
|
maxContentSize: maxContentSizeState,
|
|
206
|
-
mediaState: mediaState
|
|
206
|
+
mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
|
|
207
207
|
}));
|
|
208
208
|
}
|
|
209
209
|
export var CommentEditorWithIntl = injectIntl(Editor);
|
|
@@ -14,7 +14,7 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
14
14
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
15
15
|
import { usePresetContext } from '../../../presets/context';
|
|
16
16
|
export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
17
|
-
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3;
|
|
17
|
+
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
18
18
|
var _useState = useState(false),
|
|
19
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
20
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -66,7 +66,8 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
66
66
|
editorView: props.editorView,
|
|
67
67
|
containerElement: props.containerElement,
|
|
68
68
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
69
|
-
featureFlags: props.featureFlags
|
|
69
|
+
featureFlags: props.featureFlags,
|
|
70
|
+
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
|
|
70
71
|
}) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
|
|
71
72
|
useEffect(function () {
|
|
72
73
|
if (twoLineEditorToolbar) {
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
+
import { DN50, N40A, N50A, N80A, R200, R300, R50 } from '@atlaskit/theme/colors';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
6
|
import { themed } from '@atlaskit/theme/components';
|
|
5
|
-
import {
|
|
7
|
+
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
8
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { expandClassNames } from './class-names';
|
|
9
|
+
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
10
11
|
var EXPAND_SELECTED_BACKGROUND = themed({
|
|
11
12
|
light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
|
|
12
13
|
dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
|
|
13
14
|
});
|
|
15
|
+
|
|
16
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
14
17
|
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
|
|
15
18
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
16
19
|
light: "var(--ds-icon-subtle, ".concat(N80A, ")"),
|
|
@@ -39,6 +42,8 @@ var DANGER_STATE_BORDER_COLOR = themed({
|
|
|
39
42
|
var DANGER_STATE_BORDER_RADIUS = themed({
|
|
40
43
|
dark: '3px'
|
|
41
44
|
});
|
|
45
|
+
|
|
46
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
42
47
|
export var expandStyles = function expandStyles(props) {
|
|
43
48
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " > div {\n display: flex;\n }\n\n .", " {\n ", "\n overflow: hidden;\n cursor: pointer;\n box-sizing: border-box;\n\n td > & {\n margin-top: 0;\n }\n\n .", " svg {\n ", ";\n transform: rotate(90deg);\n }\n\n &.", ":not(.danger) {\n ", "\n\n ::after {\n // Custom background color and borders (for dark theme).\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n }\n }\n\n &.danger {\n background: ", ";\n border: ", ";\n border-color: ", ";\n border-radius: ", ";\n }\n }\n\n .ProseMirror\n > .", ",\n .", "\n > .", " {\n margin-left: -", "px;\n margin-right: -", "px;\n }\n\n .", " {\n ", "\n cursor: text;\n padding-top: 0px;\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", ";\n align-items: center;\n overflow: visible;\n }\n\n .", " {\n background: ", ";\n border-color: ", ";\n\n .", " {\n padding-top: ", ";\n }\n }\n\n .", " {\n width: 100%;\n }\n\n /* stylelint-disable property-no-unknown, value-keyword-case */\n .", ":(.", ") {\n .expand-content-wrapper {\n height: auto;\n }\n }\n /* stylelint-enable property-no-unknown, value-keyword-case */\n\n .", ":not(.", ") {\n .ak-editor-expand__content {\n position: absolute;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap;\n }\n\n .", " svg {\n ", ";\n transform: rotate(0deg);\n }\n\n &:not(.", "):not(.danger) {\n background: transparent;\n border-color: transparent;\n\n &:hover {\n border-color: ", ";\n background: ", ";\n }\n }\n }\n"])), expandClassNames.icon, expandClassNames.prefix, sharedExpandStyles.containerStyles({
|
|
44
49
|
expanded: false,
|
|
@@ -16,7 +16,7 @@ import { layoutStyles } from './layout';
|
|
|
16
16
|
import { panelStyles } from './panel';
|
|
17
17
|
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
18
18
|
import { extensionStyles } from '../../plugins/extension/ui/styles';
|
|
19
|
-
import { expandStyles } from '
|
|
19
|
+
import { expandStyles } from './expand';
|
|
20
20
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
21
21
|
import { findReplaceStyles } from '../../plugins/find-replace/styles';
|
|
22
22
|
import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
|
|
@@ -102,7 +102,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
102
102
|
jiraIssueCollectorScriptLoading: true,
|
|
103
103
|
showOptOutOption: false
|
|
104
104
|
});
|
|
105
|
-
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.
|
|
105
|
+
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.base) === null || _this$props$api === void 0 ? void 0 : _this$props$api.sharedState.currentState();
|
|
106
106
|
sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
107
107
|
contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
108
108
|
tabId = window.sessionStorage['awc.tab.id'];
|
package/dist/esm/use-preset.js
CHANGED
|
@@ -35,7 +35,6 @@ import { usePresetContext } from './presets/context';
|
|
|
35
35
|
*/
|
|
36
36
|
export function usePreset(createPreset, dependencies) {
|
|
37
37
|
var editorApi = usePresetContext();
|
|
38
|
-
|
|
39
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
39
|
var preset = useMemo(createPreset, dependencies);
|
|
41
40
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "189.3.
|
|
2
|
+
export var version = "189.3.15";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { AnalyticsEventPayload } from './types';
|
|
3
|
-
import type { HigherOrderCommand } from '../../types/command';
|
|
4
3
|
/**
|
|
5
4
|
*
|
|
6
5
|
* @private
|
|
@@ -10,13 +9,3 @@ import type { HigherOrderCommand } from '../../types/command';
|
|
|
10
9
|
*
|
|
11
10
|
*/
|
|
12
11
|
export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
|
|
13
|
-
export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @private
|
|
17
|
-
* @deprecated
|
|
18
|
-
*
|
|
19
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
export declare function withAnalytics(payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback, channel?: string): HigherOrderCommand;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
export type FindReplaceToolbarButtonWithStateProps = {
|
|
6
7
|
popupsBoundariesElement?: HTMLElement;
|
|
7
8
|
popupsMountPoint?: HTMLElement;
|
|
@@ -12,6 +13,7 @@ export type FindReplaceToolbarButtonWithStateProps = {
|
|
|
12
13
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
13
14
|
takeFullWidth?: boolean;
|
|
14
15
|
featureFlags: FeatureFlags;
|
|
16
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
15
17
|
};
|
|
16
|
-
declare const FindReplaceToolbarButtonWithState:
|
|
18
|
+
declare const FindReplaceToolbarButtonWithState: ({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, featureFlags, editorAnalyticsAPI, takeFullWidth, }: FindReplaceToolbarButtonWithStateProps) => JSX.Element | null;
|
|
17
19
|
export default FindReplaceToolbarButtonWithState;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { Command } from '../../types';
|
|
3
|
-
import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
export declare const activateWithAnalytics: ({ triggerMethod, }: {
|
|
3
|
+
import type { TRIGGER_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const activateWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
5
5
|
triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR;
|
|
6
6
|
}) => Command;
|
|
7
|
-
export declare const findWithAnalytics: ({ editorView, containerElement, keyword, }: {
|
|
7
|
+
export declare const findWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ editorView, containerElement, keyword, }: {
|
|
8
8
|
editorView: EditorView;
|
|
9
9
|
containerElement: HTMLElement | null;
|
|
10
10
|
keyword?: string | undefined;
|
|
11
|
-
}) => Command;
|
|
12
|
-
export declare const findNextWithAnalytics: ({ triggerMethod, }: {
|
|
11
|
+
}) => import("@atlaskit/editor-common/types").Command;
|
|
12
|
+
export declare const findNextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
13
13
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
14
14
|
}) => Command;
|
|
15
|
-
export declare const findPrevWithAnalytics: ({ triggerMethod, }: {
|
|
15
|
+
export declare const findPrevWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
16
16
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
17
17
|
}) => Command;
|
|
18
|
-
export declare const replaceWithAnalytics: ({ triggerMethod, replaceText, }: {
|
|
18
|
+
export declare const replaceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, replaceText, }: {
|
|
19
19
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
20
20
|
replaceText: string;
|
|
21
21
|
}) => Command;
|
|
22
|
-
export declare const replaceAllWithAnalytics: ({ replaceText
|
|
22
|
+
export declare const replaceAllWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ replaceText }: {
|
|
23
23
|
replaceText: string;
|
|
24
24
|
}) => Command;
|
|
25
|
-
export declare const cancelSearchWithAnalytics: ({ triggerMethod, }: {
|
|
25
|
+
export declare const cancelSearchWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
|
|
26
26
|
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
|
|
27
27
|
}) => Command;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
4
|
type Config = {
|
|
4
5
|
takeFullWidth: boolean;
|
|
5
6
|
twoLineEditorToolbar: boolean;
|
|
6
7
|
};
|
|
7
|
-
export
|
|
8
|
+
export type FindReplacePlugin = NextEditorPlugin<'findReplace', {
|
|
8
9
|
pluginConfiguration: Config;
|
|
9
|
-
dependencies: [FeatureFlagsPlugin];
|
|
10
|
+
dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
|
|
10
11
|
}>;
|
|
12
|
+
export declare const findReplacePlugin: FindReplacePlugin;
|
|
11
13
|
export default findReplacePlugin;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
declare const keymapPlugin: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<any>;
|
|
3
4
|
export default keymapPlugin;
|