@atlaskit/editor-core 189.3.13 → 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 +18 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
- 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 -24
- package/dist/cjs/plugins/mobile-dimensions/index.js +6 -0
- package/dist/cjs/presets/context.js +5 -3
- package/dist/cjs/presets/universal.js +14 -4
- package/dist/cjs/ui/Appearance/Chromeless.js +18 -9
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +7 -9
- 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/create-editor/ErrorBoundary.js +0 -2
- 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 -2
- package/dist/es2019/plugins/mobile-dimensions/index.js +6 -0
- package/dist/es2019/presets/context.js +2 -2
- package/dist/es2019/presets/universal.js +11 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +17 -9
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +8 -9
- 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/create-editor/ErrorBoundary.js +0 -2
- 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 -2
- package/dist/esm/plugins/mobile-dimensions/index.js +6 -0
- package/dist/esm/presets/context.js +2 -2
- package/dist/esm/presets/universal.js +10 -1
- package/dist/esm/ui/Appearance/Chromeless.js +15 -9
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/esm/ui/AppearanceComponents/Mobile.js +7 -9
- 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 -2
- package/dist/types/plugins/insert-block/types.d.ts +1 -1
- package/dist/types/plugins/mobile-dimensions/index.d.ts +5 -1
- package/dist/types/presets/context.d.ts +2 -2
- package/dist/types/presets/universal.d.ts +5 -0
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -1
- 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 -2
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/mobile-dimensions/index.d.ts +5 -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/ui/Appearance/Chromeless.d.ts +1 -1
- package/dist/types-ts4.5/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
- package/package.json +6 -9
- 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/cjs/plugins/max-content-size/index.js +0 -44
- 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/es2019/plugins/max-content-size/index.js +0 -35
- 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/esm/plugins/max-content-size/index.js +0 -37
- 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/plugins/max-content-size/index.d.ts +0 -13
- 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
- package/dist/types-ts4.5/plugins/max-content-size/index.d.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.3.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42925](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42925) [`8ea16423505`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8ea16423505) - Removes FF platform.editor.update-table-cell-width-via-step
|
|
8
|
+
- [#42859](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42859) [`16cc82bf2e3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/16cc82bf2e3) - ED-20721 Extract Expand Plugin
|
|
9
|
+
- [#42937](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42937) [`c9a523f6662`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c9a523f6662) - Remove internal withAnalytics function.
|
|
10
|
+
- [#42451](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42451) [`36764ad64a9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/36764ad64a9) - [ECA11Y-87] Mentioned name is not communicated to the users of screen reader
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 189.3.14
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#42995](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42995) [`a527682dee6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a527682dee6) - add in missing dependencies for imported types
|
|
18
|
+
- [#42618](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42618) [`d55f8d9c0a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d55f8d9c0a3) - ED-20359 extracted max-content-size plugin from editor-core
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 189.3.13
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -26,7 +26,7 @@ var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
|
26
26
|
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; }
|
|
27
27
|
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; }
|
|
28
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
29
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
30
30
|
var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
31
31
|
(0, _inherits2.default)(ErrorBoundaryWithEditorView, _React$Component);
|
|
32
32
|
var _super = _createSuper(ErrorBoundaryWithEditorView);
|
|
@@ -13,4 +13,4 @@ var _templateObject;
|
|
|
13
13
|
// For reasoning behind styles, see comments in:
|
|
14
14
|
// ./getInlineNodeViewProducer -> portalChildren()
|
|
15
15
|
|
|
16
|
-
var InlineNodeViewSharedStyles = exports.InlineNodeViewSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(
|
|
16
|
+
var InlineNodeViewSharedStyles = exports.InlineNodeViewSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(.zeroWidthSpaceContainer) {\n white-space: pre-wrap;\n }\n // Prevent visually hidden assistive text from being selected.\n & > .assistive {\n user-select: none;\n }\n }\n /** Remove browser deafult selections style. This prevents\n unexpected visual artefacts in Safari when navigating\n with the keyboard or making range selections. */\n &.ua-safari {\n .", " {\n ::selection,\n *::selection {\n background: transparent;\n }\n }\n }\n\n &.ua-chrome .", " > span {\n user-select: none;\n }\n\n .", "AddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), _reactNodeView.inlineNodeViewClassname, _reactNodeView.inlineNodeViewClassname, _reactNodeView.inlineNodeViewClassname, _reactNodeView.inlineNodeViewClassname, _utils.ZERO_WIDTH_SPACE);
|
|
@@ -11,12 +11,6 @@ Object.defineProperty(exports, "addAnalytics", {
|
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
exports.default = void 0;
|
|
14
|
-
Object.defineProperty(exports, "withAnalytics", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _utils.withAnalytics;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
14
|
var _plugin = _interopRequireDefault(require("./plugin"));
|
|
21
15
|
var _utils = require("./utils");
|
|
22
16
|
var _default = exports.default = _plugin.default;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.addAnalytics = addAnalytics;
|
|
7
|
-
exports.withAnalytics = withAnalytics;
|
|
8
7
|
var _consts = require("./consts");
|
|
9
8
|
var _pluginKey = require("./plugin-key");
|
|
10
9
|
function getCreateUIAnalyticsEvent(editorState) {
|
|
@@ -33,32 +32,4 @@ function addAnalytics(state, tr, payload) {
|
|
|
33
32
|
}
|
|
34
33
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
|
|
35
34
|
return tr;
|
|
36
|
-
}
|
|
37
|
-
// Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
|
|
38
|
-
// If changes are made to this function, please make the same update in the linked file.
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* @private
|
|
42
|
-
* @deprecated
|
|
43
|
-
*
|
|
44
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
function withAnalytics(payload, channel) {
|
|
48
|
-
return function (command) {
|
|
49
|
-
return function (state, dispatch, view) {
|
|
50
|
-
return command(state, function (tr) {
|
|
51
|
-
if (dispatch) {
|
|
52
|
-
if (payload instanceof Function) {
|
|
53
|
-
var dynamicPayload = payload(state);
|
|
54
|
-
if (dynamicPayload) {
|
|
55
|
-
dispatch(addAnalytics(state, tr, dynamicPayload, channel));
|
|
56
|
-
}
|
|
57
|
-
} else {
|
|
58
|
-
dispatch(addAnalytics(state, tr, payload, channel));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, view);
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
35
|
}
|
|
@@ -13,10 +13,10 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
13
13
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _LayoutButton = _interopRequireDefault(require("./ui/LayoutButton"));
|
|
16
|
-
var _constants = require("./constants");
|
|
17
16
|
var _pluginKey = require("./plugin-key");
|
|
18
17
|
var _findBreakoutNode = require("./utils/find-breakout-node");
|
|
19
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
19
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
20
20
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
21
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
22
|
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; }
|
|
@@ -77,9 +77,9 @@ var BreakoutView = /*#__PURE__*/function () {
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
var contentDOM = document.createElement('div');
|
|
80
|
-
contentDOM.className =
|
|
80
|
+
contentDOM.className = _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM;
|
|
81
81
|
var dom = document.createElement('div');
|
|
82
|
-
dom.className =
|
|
82
|
+
dom.className = _styles.BreakoutCssClassName.BREAKOUT_MARK;
|
|
83
83
|
dom.setAttribute('data-layout', mark.attrs.mode);
|
|
84
84
|
dom.appendChild(contentDOM);
|
|
85
85
|
this.dom = dom;
|
|
@@ -25,12 +25,12 @@ var _ToolbarButton = _interopRequireDefault(require("../../../ui/ToolbarButton")
|
|
|
25
25
|
var _getBreakoutMode = require("../utils/get-breakout-mode");
|
|
26
26
|
var _setBreakoutMode = require("../commands/set-breakout-mode");
|
|
27
27
|
var _removeBreakout = require("../commands/remove-breakout");
|
|
28
|
-
var
|
|
28
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
29
29
|
var _isBreakoutMarkAllowed = require("../utils/is-breakout-mark-allowed");
|
|
30
30
|
var _pluginKey = require("../plugin-key");
|
|
31
31
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
32
32
|
var _isSupportedNode = require("../utils/is-supported-node");
|
|
33
|
-
var
|
|
33
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
34
34
|
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
35
35
|
var _templateObject;
|
|
36
36
|
/** @jsx jsx */
|
|
@@ -88,7 +88,7 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
88
88
|
var titleMessage = (0, _utils2.getTitle)(breakoutMode);
|
|
89
89
|
var title = formatMessage(titleMessage);
|
|
90
90
|
var nextBreakoutMode = (0, _utils2.getNextBreakoutMode)(breakoutMode);
|
|
91
|
-
var belowOtherPopupsZIndex =
|
|
91
|
+
var belowOtherPopupsZIndex = _constants.layers.layer() - 1;
|
|
92
92
|
var pluginState = (0, _pluginKey.getPluginState)(state);
|
|
93
93
|
if (!pluginState) {
|
|
94
94
|
return null;
|
|
@@ -97,7 +97,7 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
97
97
|
if (!element) {
|
|
98
98
|
return null;
|
|
99
99
|
}
|
|
100
|
-
var closestEl = element.querySelector(".".concat(
|
|
100
|
+
var closestEl = element.querySelector(".".concat(_styles.BreakoutCssClassName.BREAKOUT_MARK_DOM));
|
|
101
101
|
if (closestEl && closestEl.firstChild) {
|
|
102
102
|
element = closestEl.firstChild;
|
|
103
103
|
}
|
|
@@ -12,15 +12,17 @@ var _commandsWithAnalytics = require("./commands-with-analytics");
|
|
|
12
12
|
var _commands = require("./commands");
|
|
13
13
|
var _FindReplaceToolbarButton = _interopRequireDefault(require("./ui/FindReplaceToolbarButton"));
|
|
14
14
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
15
|
-
var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithState(
|
|
16
|
-
var popupsBoundariesElement =
|
|
17
|
-
popupsMountPoint =
|
|
18
|
-
popupsScrollableElement =
|
|
19
|
-
isToolbarReducedSpacing =
|
|
20
|
-
editorView =
|
|
21
|
-
containerElement =
|
|
22
|
-
dispatchAnalyticsEvent =
|
|
23
|
-
featureFlags =
|
|
15
|
+
var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithState(_ref) {
|
|
16
|
+
var popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
17
|
+
popupsMountPoint = _ref.popupsMountPoint,
|
|
18
|
+
popupsScrollableElement = _ref.popupsScrollableElement,
|
|
19
|
+
isToolbarReducedSpacing = _ref.isToolbarReducedSpacing,
|
|
20
|
+
editorView = _ref.editorView,
|
|
21
|
+
containerElement = _ref.containerElement,
|
|
22
|
+
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
23
|
+
featureFlags = _ref.featureFlags,
|
|
24
|
+
editorAnalyticsAPI = _ref.editorAnalyticsAPI,
|
|
25
|
+
takeFullWidth = _ref.takeFullWidth;
|
|
24
26
|
if (!editorView) {
|
|
25
27
|
return null;
|
|
26
28
|
}
|
|
@@ -41,50 +43,50 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
41
43
|
};
|
|
42
44
|
var handleActivate = function handleActivate() {
|
|
43
45
|
runWithEditorFocused(function () {
|
|
44
|
-
return dispatchCommand((0, _commandsWithAnalytics.activateWithAnalytics)({
|
|
46
|
+
return dispatchCommand((0, _commandsWithAnalytics.activateWithAnalytics)(editorAnalyticsAPI)({
|
|
45
47
|
triggerMethod: _analytics.TRIGGER_METHOD.TOOLBAR
|
|
46
48
|
}));
|
|
47
49
|
});
|
|
48
50
|
};
|
|
49
51
|
var handleFind = function handleFind(keyword) {
|
|
50
52
|
runWithEditorFocused(function () {
|
|
51
|
-
return dispatchCommand((0, _commandsWithAnalytics.findWithAnalytics)({
|
|
53
|
+
return dispatchCommand((0, _commandsWithAnalytics.findWithAnalytics)(editorAnalyticsAPI)({
|
|
52
54
|
editorView: editorView,
|
|
53
55
|
containerElement: containerElement,
|
|
54
56
|
keyword: keyword
|
|
55
57
|
}));
|
|
56
58
|
});
|
|
57
59
|
};
|
|
58
|
-
var handleFindNext = function handleFindNext(
|
|
59
|
-
var triggerMethod =
|
|
60
|
+
var handleFindNext = function handleFindNext(_ref2) {
|
|
61
|
+
var triggerMethod = _ref2.triggerMethod;
|
|
60
62
|
runWithEditorFocused(function () {
|
|
61
|
-
return dispatchCommand((0, _commandsWithAnalytics.findNextWithAnalytics)({
|
|
63
|
+
return dispatchCommand((0, _commandsWithAnalytics.findNextWithAnalytics)(editorAnalyticsAPI)({
|
|
62
64
|
triggerMethod: triggerMethod
|
|
63
65
|
}));
|
|
64
66
|
});
|
|
65
67
|
};
|
|
66
|
-
var handleFindPrev = function handleFindPrev(
|
|
67
|
-
var triggerMethod =
|
|
68
|
+
var handleFindPrev = function handleFindPrev(_ref3) {
|
|
69
|
+
var triggerMethod = _ref3.triggerMethod;
|
|
68
70
|
runWithEditorFocused(function () {
|
|
69
|
-
return dispatchCommand((0, _commandsWithAnalytics.findPrevWithAnalytics)({
|
|
71
|
+
return dispatchCommand((0, _commandsWithAnalytics.findPrevWithAnalytics)(editorAnalyticsAPI)({
|
|
70
72
|
triggerMethod: triggerMethod
|
|
71
73
|
}));
|
|
72
74
|
});
|
|
73
75
|
};
|
|
74
|
-
var handleReplace = function handleReplace(
|
|
75
|
-
var triggerMethod =
|
|
76
|
-
replaceText =
|
|
76
|
+
var handleReplace = function handleReplace(_ref4) {
|
|
77
|
+
var triggerMethod = _ref4.triggerMethod,
|
|
78
|
+
replaceText = _ref4.replaceText;
|
|
77
79
|
runWithEditorFocused(function () {
|
|
78
|
-
return dispatchCommand((0, _commandsWithAnalytics.replaceWithAnalytics)({
|
|
80
|
+
return dispatchCommand((0, _commandsWithAnalytics.replaceWithAnalytics)(editorAnalyticsAPI)({
|
|
79
81
|
triggerMethod: triggerMethod,
|
|
80
82
|
replaceText: replaceText
|
|
81
83
|
}));
|
|
82
84
|
});
|
|
83
85
|
};
|
|
84
|
-
var handleReplaceAll = function handleReplaceAll(
|
|
85
|
-
var replaceText =
|
|
86
|
+
var handleReplaceAll = function handleReplaceAll(_ref5) {
|
|
87
|
+
var replaceText = _ref5.replaceText;
|
|
86
88
|
runWithEditorFocused(function () {
|
|
87
|
-
return dispatchCommand((0, _commandsWithAnalytics.replaceAllWithAnalytics)({
|
|
89
|
+
return dispatchCommand((0, _commandsWithAnalytics.replaceAllWithAnalytics)(editorAnalyticsAPI)({
|
|
88
90
|
replaceText: replaceText
|
|
89
91
|
}));
|
|
90
92
|
});
|
|
@@ -92,9 +94,9 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
92
94
|
var handleFindBlur = function handleFindBlur() {
|
|
93
95
|
dispatchCommand((0, _commands.blur)());
|
|
94
96
|
};
|
|
95
|
-
var handleCancel = function handleCancel(
|
|
96
|
-
var triggerMethod =
|
|
97
|
-
dispatchCommand((0, _commandsWithAnalytics.cancelSearchWithAnalytics)({
|
|
97
|
+
var handleCancel = function handleCancel(_ref6) {
|
|
98
|
+
var triggerMethod = _ref6.triggerMethod;
|
|
99
|
+
dispatchCommand((0, _commandsWithAnalytics.cancelSearchWithAnalytics)(editorAnalyticsAPI)({
|
|
98
100
|
triggerMethod: triggerMethod
|
|
99
101
|
}));
|
|
100
102
|
editorView.focus();
|
|
@@ -108,8 +110,8 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
108
110
|
plugins: {
|
|
109
111
|
findReplaceState: _types.findReplacePluginKey
|
|
110
112
|
},
|
|
111
|
-
render: function render(
|
|
112
|
-
var findReplaceState =
|
|
113
|
+
render: function render(_ref7) {
|
|
114
|
+
var findReplaceState = _ref7.findReplaceState;
|
|
113
115
|
if (!findReplaceState) {
|
|
114
116
|
return null;
|
|
115
117
|
}
|
|
@@ -136,7 +138,7 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
136
138
|
onFindPrev: handleFindPrev,
|
|
137
139
|
onReplace: handleReplace,
|
|
138
140
|
onReplaceAll: handleReplaceAll,
|
|
139
|
-
takeFullWidth: !!
|
|
141
|
+
takeFullWidth: !!takeFullWidth
|
|
140
142
|
});
|
|
141
143
|
}
|
|
142
144
|
});
|
|
@@ -5,83 +5,97 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.replaceWithAnalytics = exports.replaceAllWithAnalytics = exports.findWithAnalytics = exports.findPrevWithAnalytics = exports.findNextWithAnalytics = exports.cancelSearchWithAnalytics = exports.activateWithAnalytics = void 0;
|
|
7
7
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
|
-
var _analytics = require("
|
|
9
|
-
var
|
|
8
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
9
|
+
var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
|
|
10
10
|
var _commands = require("./commands");
|
|
11
|
-
var activateWithAnalytics = exports.activateWithAnalytics = function activateWithAnalytics(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
var activateWithAnalytics = exports.activateWithAnalytics = function activateWithAnalytics(editorAnalyticsAPI) {
|
|
12
|
+
return function (_ref) {
|
|
13
|
+
var triggerMethod = _ref.triggerMethod;
|
|
14
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, function (state) {
|
|
15
|
+
return {
|
|
16
|
+
eventType: _analytics.EVENT_TYPE.UI,
|
|
17
|
+
action: _analytics.ACTION.ACTIVATED,
|
|
18
|
+
actionSubject: _analytics.ACTION_SUBJECT.FIND_REPLACE_DIALOG,
|
|
19
|
+
attributes: {
|
|
20
|
+
inputMethod: state.selection instanceof _state.TextSelection && !state.selection.empty ? _analytics.INPUT_METHOD.PREFILL : _analytics.INPUT_METHOD.KEYBOARD,
|
|
21
|
+
triggerMethod: triggerMethod
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
})((0, _commands.activate)());
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
var findWithAnalytics = exports.findWithAnalytics = function findWithAnalytics(editorAnalyticsAPI) {
|
|
28
|
+
return function (_ref2) {
|
|
29
|
+
var editorView = _ref2.editorView,
|
|
30
|
+
containerElement = _ref2.containerElement,
|
|
31
|
+
keyword = _ref2.keyword;
|
|
32
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
33
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
34
|
+
action: _analytics.ACTION.FIND_PERFORMED,
|
|
35
|
+
actionSubject: _analytics.ACTION_SUBJECT.TEXT
|
|
36
|
+
})((0, _commands.find)(editorView, containerElement, keyword));
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
var findNextWithAnalytics = exports.findNextWithAnalytics = function findNextWithAnalytics(editorAnalyticsAPI) {
|
|
40
|
+
return function (_ref3) {
|
|
41
|
+
var triggerMethod = _ref3.triggerMethod;
|
|
42
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
43
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
44
|
+
action: _analytics.ACTION.FIND_NEXT_PERFORMED,
|
|
45
|
+
actionSubject: _analytics.ACTION_SUBJECT.TEXT,
|
|
18
46
|
attributes: {
|
|
19
|
-
inputMethod: state.selection instanceof _state.TextSelection && !state.selection.empty ? _analytics2.INPUT_METHOD.PREFILL : _analytics2.INPUT_METHOD.KEYBOARD,
|
|
20
47
|
triggerMethod: triggerMethod
|
|
21
48
|
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
var findWithAnalytics = exports.findWithAnalytics = function findWithAnalytics(_ref2) {
|
|
26
|
-
var editorView = _ref2.editorView,
|
|
27
|
-
containerElement = _ref2.containerElement,
|
|
28
|
-
keyword = _ref2.keyword;
|
|
29
|
-
return (0, _analytics.withAnalytics)({
|
|
30
|
-
eventType: _analytics2.EVENT_TYPE.TRACK,
|
|
31
|
-
action: _analytics2.ACTION.FIND_PERFORMED,
|
|
32
|
-
actionSubject: _analytics2.ACTION_SUBJECT.TEXT
|
|
33
|
-
})((0, _commands.find)(editorView, containerElement, keyword));
|
|
34
|
-
};
|
|
35
|
-
var findNextWithAnalytics = exports.findNextWithAnalytics = function findNextWithAnalytics(_ref3) {
|
|
36
|
-
var triggerMethod = _ref3.triggerMethod;
|
|
37
|
-
return (0, _analytics.withAnalytics)({
|
|
38
|
-
eventType: _analytics2.EVENT_TYPE.TRACK,
|
|
39
|
-
action: _analytics2.ACTION.FIND_NEXT_PERFORMED,
|
|
40
|
-
actionSubject: _analytics2.ACTION_SUBJECT.TEXT,
|
|
41
|
-
attributes: {
|
|
42
|
-
triggerMethod: triggerMethod
|
|
43
|
-
}
|
|
44
|
-
})((0, _commands.findNext)());
|
|
49
|
+
})((0, _commands.findNext)());
|
|
50
|
+
};
|
|
45
51
|
};
|
|
46
|
-
var findPrevWithAnalytics = exports.findPrevWithAnalytics = function findPrevWithAnalytics(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
var findPrevWithAnalytics = exports.findPrevWithAnalytics = function findPrevWithAnalytics(editorAnalyticsAPI) {
|
|
53
|
+
return function (_ref4) {
|
|
54
|
+
var triggerMethod = _ref4.triggerMethod;
|
|
55
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
56
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
57
|
+
action: _analytics.ACTION.FIND_PREV_PERFORMED,
|
|
58
|
+
actionSubject: _analytics.ACTION_SUBJECT.TEXT,
|
|
59
|
+
attributes: {
|
|
60
|
+
triggerMethod: triggerMethod
|
|
61
|
+
}
|
|
62
|
+
})((0, _commands.findPrevious)());
|
|
63
|
+
};
|
|
56
64
|
};
|
|
57
|
-
var replaceWithAnalytics = exports.replaceWithAnalytics = function replaceWithAnalytics(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
var replaceWithAnalytics = exports.replaceWithAnalytics = function replaceWithAnalytics(editorAnalyticsAPI) {
|
|
66
|
+
return function (_ref5) {
|
|
67
|
+
var triggerMethod = _ref5.triggerMethod,
|
|
68
|
+
replaceText = _ref5.replaceText;
|
|
69
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
70
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
71
|
+
action: _analytics.ACTION.REPLACED_ONE,
|
|
72
|
+
actionSubject: _analytics.ACTION_SUBJECT.TEXT,
|
|
73
|
+
attributes: {
|
|
74
|
+
triggerMethod: triggerMethod
|
|
75
|
+
}
|
|
76
|
+
})((0, _commands.replace)(replaceText));
|
|
77
|
+
};
|
|
68
78
|
};
|
|
69
|
-
var replaceAllWithAnalytics = exports.replaceAllWithAnalytics = function replaceAllWithAnalytics(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
var replaceAllWithAnalytics = exports.replaceAllWithAnalytics = function replaceAllWithAnalytics(editorAnalyticsAPI) {
|
|
80
|
+
return function (_ref6) {
|
|
81
|
+
var replaceText = _ref6.replaceText;
|
|
82
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
83
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
84
|
+
action: _analytics.ACTION.REPLACED_ALL,
|
|
85
|
+
actionSubject: _analytics.ACTION_SUBJECT.TEXT
|
|
86
|
+
})((0, _commands.replaceAll)(replaceText));
|
|
87
|
+
};
|
|
76
88
|
};
|
|
77
|
-
var cancelSearchWithAnalytics = exports.cancelSearchWithAnalytics = function cancelSearchWithAnalytics(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
var cancelSearchWithAnalytics = exports.cancelSearchWithAnalytics = function cancelSearchWithAnalytics(editorAnalyticsAPI) {
|
|
90
|
+
return function (_ref7) {
|
|
91
|
+
var triggerMethod = _ref7.triggerMethod;
|
|
92
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
93
|
+
eventType: _analytics.EVENT_TYPE.UI,
|
|
94
|
+
action: _analytics.ACTION.DEACTIVATED,
|
|
95
|
+
actionSubject: _analytics.ACTION_SUBJECT.FIND_REPLACE_DIALOG,
|
|
96
|
+
attributes: {
|
|
97
|
+
triggerMethod: triggerMethod
|
|
98
|
+
}
|
|
99
|
+
})((0, _commands.cancelSearch)());
|
|
100
|
+
};
|
|
87
101
|
};
|
|
@@ -26,7 +26,8 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
|
|
|
26
26
|
}, {
|
|
27
27
|
name: 'findReplaceKeymap',
|
|
28
28
|
plugin: function plugin() {
|
|
29
|
-
|
|
29
|
+
var _api$analytics;
|
|
30
|
+
return (0, _keymap.default)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
30
31
|
}
|
|
31
32
|
}];
|
|
32
33
|
},
|
|
@@ -41,6 +42,7 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
|
|
|
41
42
|
if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
|
|
42
43
|
return null;
|
|
43
44
|
} else {
|
|
45
|
+
var _api$analytics2;
|
|
44
46
|
return /*#__PURE__*/_react.default.createElement(_FindReplaceToolbarButtonWithState.default, {
|
|
45
47
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
46
48
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -50,7 +52,8 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
|
|
|
50
52
|
containerElement: containerElement,
|
|
51
53
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
52
54
|
takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
|
|
53
|
-
featureFlags: featureFlags
|
|
55
|
+
featureFlags: featureFlags,
|
|
56
|
+
editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
54
57
|
});
|
|
55
58
|
}
|
|
56
59
|
}
|
|
@@ -8,17 +8,17 @@ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
|
8
8
|
var _keymaps = require("../../keymaps");
|
|
9
9
|
var _commandsWithAnalytics = require("./commands-with-analytics");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
|
-
var activateFindReplace = function activateFindReplace() {
|
|
11
|
+
var activateFindReplace = function activateFindReplace(editorAnalyticsAPI) {
|
|
12
12
|
return function (state, dispatch) {
|
|
13
|
-
(0, _commandsWithAnalytics.activateWithAnalytics)({
|
|
13
|
+
(0, _commandsWithAnalytics.activateWithAnalytics)(editorAnalyticsAPI)({
|
|
14
14
|
triggerMethod: _analytics.TRIGGER_METHOD.SHORTCUT
|
|
15
15
|
})(state, dispatch);
|
|
16
16
|
return true;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
var keymapPlugin = function keymapPlugin() {
|
|
19
|
+
var keymapPlugin = function keymapPlugin(editorAnalyticsAPI) {
|
|
20
20
|
var list = {};
|
|
21
|
-
(0, _keymaps.bindKeymapWithCommand)(_keymaps.find.common, activateFindReplace(), list);
|
|
21
|
+
(0, _keymaps.bindKeymapWithCommand)(_keymaps.find.common, activateFindReplace(editorAnalyticsAPI), list);
|
|
22
22
|
return (0, _keymap.keymap)(list);
|
|
23
23
|
};
|
|
24
24
|
var _default = exports.default = keymapPlugin;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -71,12 +70,6 @@ Object.defineProperty(exports, "dataConsumerMarkPlugin", {
|
|
|
71
70
|
return _dataConsumer.default;
|
|
72
71
|
}
|
|
73
72
|
});
|
|
74
|
-
Object.defineProperty(exports, "expandPlugin", {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function get() {
|
|
77
|
-
return _expand.default;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
73
|
Object.defineProperty(exports, "extensionPlugin", {
|
|
81
74
|
enumerable: true,
|
|
82
75
|
get: function get() {
|
|
@@ -107,12 +100,6 @@ Object.defineProperty(exports, "insertBlockPlugin", {
|
|
|
107
100
|
return _insertBlock.default;
|
|
108
101
|
}
|
|
109
102
|
});
|
|
110
|
-
Object.defineProperty(exports, "isExpandInsertionEnabled", {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
get: function get() {
|
|
113
|
-
return _expand.isExpandInsertionEnabled;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
103
|
Object.defineProperty(exports, "jiraIssuePlugin", {
|
|
117
104
|
enumerable: true,
|
|
118
105
|
get: function get() {
|
|
@@ -125,12 +112,6 @@ Object.defineProperty(exports, "macroPlugin", {
|
|
|
125
112
|
return _macro.default;
|
|
126
113
|
}
|
|
127
114
|
});
|
|
128
|
-
Object.defineProperty(exports, "maxContentSizePlugin", {
|
|
129
|
-
enumerable: true,
|
|
130
|
-
get: function get() {
|
|
131
|
-
return _maxContentSize.default;
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
115
|
Object.defineProperty(exports, "mobileDimensionsPlugin", {
|
|
135
116
|
enumerable: true,
|
|
136
117
|
get: function get() {
|
|
@@ -180,7 +161,6 @@ var _insertBlock = _interopRequireDefault(require("./insert-block"));
|
|
|
180
161
|
var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
|
|
181
162
|
var _toolbarListsIndentation = _interopRequireDefault(require("./toolbar-lists-indentation"));
|
|
182
163
|
var _macro = _interopRequireDefault(require("./macro"));
|
|
183
|
-
var _maxContentSize = _interopRequireDefault(require("./max-content-size"));
|
|
184
164
|
var _paste = _interopRequireDefault(require("./paste"));
|
|
185
165
|
var _tasksAndDecisions = _interopRequireDefault(require("./tasks-and-decisions"));
|
|
186
166
|
var _breakout = _interopRequireDefault(require("./breakout"));
|
|
@@ -191,7 +171,6 @@ var _annotation = _interopRequireDefault(require("./annotation"));
|
|
|
191
171
|
var _analytics = _interopRequireDefault(require("./analytics"));
|
|
192
172
|
var _customAutoformat = _interopRequireDefault(require("./custom-autoformat"));
|
|
193
173
|
var _feedbackDialog = _interopRequireDefault(require("./feedback-dialog"));
|
|
194
|
-
var _expand = _interopRequireWildcard(require("./expand"));
|
|
195
174
|
var _mobileDimensions = _interopRequireDefault(require("./mobile-dimensions"));
|
|
196
175
|
var _findReplace = _interopRequireDefault(require("./find-replace"));
|
|
197
176
|
var _mobileSelection = _interopRequireDefault(require("./mobile-selection"));
|
|
@@ -199,6 +178,4 @@ var _undoRedo = _interopRequireDefault(require("./undo-redo"));
|
|
|
199
178
|
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
200
179
|
var _viewUpdateSubscription = _interopRequireDefault(require("./view-update-subscription"));
|
|
201
180
|
var _beforePrimaryToolbar = _interopRequireDefault(require("./before-primaryToolbar"));
|
|
202
|
-
var _codeBidiWarning = _interopRequireDefault(require("./code-bidi-warning"));
|
|
203
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
204
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
181
|
+
var _codeBidiWarning = _interopRequireDefault(require("./code-bidi-warning"));
|
|
@@ -79,6 +79,12 @@ var createPlugin = function createPlugin(dispatch) {
|
|
|
79
79
|
var mobileDimensionsPlugin = function mobileDimensionsPlugin() {
|
|
80
80
|
return {
|
|
81
81
|
name: 'mobileDimensions',
|
|
82
|
+
getSharedState: function getSharedState(editorState) {
|
|
83
|
+
if (!editorState) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
return _pluginFactory.mobileDimensionsPluginKey.getState(editorState);
|
|
87
|
+
},
|
|
82
88
|
pmPlugins: function pmPlugins() {
|
|
83
89
|
return [{
|
|
84
90
|
name: 'mobileDimensions',
|
|
@@ -5,7 +5,9 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.PresetContextProvider = exports.EditorAPIContext = void 0;
|
|
9
|
+
exports.usePresetContext = usePresetContext;
|
|
10
|
+
exports.useSetPresetContext = void 0;
|
|
9
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -24,11 +26,11 @@ var PresetContextProvider = exports.PresetContextProvider = function PresetConte
|
|
|
24
26
|
}
|
|
25
27
|
}, children);
|
|
26
28
|
};
|
|
27
|
-
|
|
29
|
+
function usePresetContext() {
|
|
28
30
|
var _useContext = (0, _react.useContext)(EditorAPIContext),
|
|
29
31
|
editorApi = _useContext.editorApi;
|
|
30
32
|
return editorApi;
|
|
31
|
-
}
|
|
33
|
+
}
|
|
32
34
|
var useSetPresetContext = exports.useSetPresetContext = function useSetPresetContext() {
|
|
33
35
|
var _useContext2 = (0, _react.useContext)(EditorAPIContext),
|
|
34
36
|
setEditorApi = _useContext2.setEditorApi;
|