@atlaskit/editor-plugin-expand 27.0.3 → 27.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/legacyExpand/commands.js +27 -25
- package/dist/cjs/legacyExpand/nodeviews/index.js +34 -31
- package/dist/cjs/legacyExpand/plugin.js +16 -15
- package/dist/cjs/legacyExpand/pm-plugins/keymap.js +6 -4
- package/dist/cjs/legacyExpand/pm-plugins/main.js +6 -6
- package/dist/cjs/legacyExpand/pm-plugins/plugin-factory.js +2 -2
- package/dist/cjs/legacyExpand/ui/ExpandIconButton.js +9 -9
- package/dist/cjs/singlePlayerExpand/commands.js +33 -31
- package/dist/cjs/singlePlayerExpand/node-views/index.js +18 -15
- package/dist/cjs/singlePlayerExpand/plugin.js +16 -15
- package/dist/cjs/singlePlayerExpand/pm-plugins/keymap.js +6 -4
- package/dist/cjs/singlePlayerExpand/pm-plugins/main.js +6 -6
- package/dist/cjs/singlePlayerExpand/ui/ExpandButton.js +9 -9
- package/dist/cjs/singlePlayerExpand/ui/NodeView.js +16 -16
- package/dist/cjs/ui/ExpandBlockMenuItem.js +7 -7
- package/dist/cjs/ui/quick-insert/ExpandQuickInsertMenuItem.js +15 -15
- package/dist/cjs/ui/quick-insert/getExpandQuickInsertComponents.js +3 -3
- package/dist/es2019/legacyExpand/commands.js +6 -4
- package/dist/es2019/legacyExpand/nodeviews/index.js +7 -4
- package/dist/es2019/legacyExpand/plugin.js +5 -4
- package/dist/es2019/legacyExpand/pm-plugins/keymap.js +3 -1
- package/dist/es2019/legacyExpand/pm-plugins/main.js +1 -1
- package/dist/es2019/legacyExpand/pm-plugins/plugin-factory.js +1 -1
- package/dist/es2019/legacyExpand/ui/ExpandIconButton.js +3 -3
- package/dist/es2019/singlePlayerExpand/commands.js +6 -4
- package/dist/es2019/singlePlayerExpand/node-views/index.js +6 -3
- package/dist/es2019/singlePlayerExpand/plugin.js +5 -4
- package/dist/es2019/singlePlayerExpand/pm-plugins/keymap.js +3 -1
- package/dist/es2019/singlePlayerExpand/pm-plugins/main.js +1 -1
- package/dist/es2019/singlePlayerExpand/ui/ExpandButton.js +3 -3
- package/dist/es2019/singlePlayerExpand/ui/NodeView.js +2 -2
- package/dist/es2019/ui/ExpandBlockMenuItem.js +3 -3
- package/dist/es2019/ui/quick-insert/ExpandQuickInsertMenuItem.js +4 -4
- package/dist/es2019/ui/quick-insert/getExpandQuickInsertComponents.js +1 -1
- package/dist/esm/legacyExpand/commands.js +6 -4
- package/dist/esm/legacyExpand/nodeviews/index.js +7 -4
- package/dist/esm/legacyExpand/plugin.js +5 -4
- package/dist/esm/legacyExpand/pm-plugins/keymap.js +3 -1
- package/dist/esm/legacyExpand/pm-plugins/main.js +1 -1
- package/dist/esm/legacyExpand/pm-plugins/plugin-factory.js +1 -1
- package/dist/esm/legacyExpand/ui/ExpandIconButton.js +3 -3
- package/dist/esm/singlePlayerExpand/commands.js +6 -4
- package/dist/esm/singlePlayerExpand/node-views/index.js +6 -3
- package/dist/esm/singlePlayerExpand/plugin.js +5 -4
- package/dist/esm/singlePlayerExpand/pm-plugins/keymap.js +3 -1
- package/dist/esm/singlePlayerExpand/pm-plugins/main.js +1 -1
- package/dist/esm/singlePlayerExpand/ui/ExpandButton.js +3 -3
- package/dist/esm/singlePlayerExpand/ui/NodeView.js +2 -2
- package/dist/esm/ui/ExpandBlockMenuItem.js +3 -3
- package/dist/esm/ui/quick-insert/ExpandQuickInsertMenuItem.js +4 -4
- package/dist/esm/ui/quick-insert/getExpandQuickInsertComponents.js +1 -1
- package/dist/types/legacyExpand/commands.d.ts +3 -2
- package/dist/types/legacyExpand/nodeviews/index.d.ts +4 -3
- package/dist/types/legacyExpand/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/legacyExpand/pm-plugins/main.d.ts +3 -2
- package/dist/types/legacyExpand/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/legacyExpand/toolbar.d.ts +2 -1
- package/dist/types/singlePlayerExpand/commands.d.ts +4 -3
- package/dist/types/singlePlayerExpand/node-views/index.d.ts +4 -3
- package/dist/types/singlePlayerExpand/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/singlePlayerExpand/pm-plugins/main.d.ts +3 -2
- package/dist/types/singlePlayerExpand/toolbar.d.ts +2 -1
- package/dist/types/types.d.ts +16 -13
- package/dist/types/ui/ExpandBlockMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/ExpandQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/getExpandQuickInsertComponents.d.ts +1 -1
- package/package.json +2 -2
|
@@ -8,12 +8,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.ExpandQuickInsertMenuItem = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
14
13
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
14
|
+
var _messages = require("@atlaskit/editor-common/quick-insert/messages");
|
|
15
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
16
|
+
var _createWrapSelectionTransaction = require("@atlaskit/editor-common/utils/create-wrap-selection-transaction");
|
|
17
17
|
var _expandElement = _interopRequireDefault(require("@atlaskit/icon-lab/core/expand-element"));
|
|
18
18
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
19
|
var _commands = require("../../legacyExpand/commands");
|
|
@@ -29,11 +29,11 @@ var ExpandQuickInsertMenuItem = exports.ExpandQuickInsertMenuItem = function Exp
|
|
|
29
29
|
return previewImageUrls ? {
|
|
30
30
|
image: previewImageUrls,
|
|
31
31
|
attribution: {
|
|
32
|
-
name: formatMessage(
|
|
32
|
+
name: formatMessage(_messages.messages.previewAttributionAtlassian)
|
|
33
33
|
}
|
|
34
34
|
} : undefined;
|
|
35
35
|
}, [formatMessage, previewImageUrls]);
|
|
36
|
-
var _useSharedPluginState = (0,
|
|
36
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['editorDisabled', 'editorViewMode'], function (states) {
|
|
37
37
|
var _states$editorDisable, _states$editorViewMod;
|
|
38
38
|
return {
|
|
39
39
|
editorDisabled: (_states$editorDisable = states.editorDisabledState) === null || _states$editorDisable === void 0 ? void 0 : _states$editorDisable.editorDisabled,
|
|
@@ -52,29 +52,29 @@ var ExpandQuickInsertMenuItem = exports.ExpandQuickInsertMenuItem = function Exp
|
|
|
52
52
|
if (!node) {
|
|
53
53
|
return false;
|
|
54
54
|
}
|
|
55
|
-
var tr = state.selection.empty ? insert(node) : isLegacy || !(0, _fg.fg)('platform_editor_adf_with_localid') ? (0,
|
|
55
|
+
var tr = state.selection.empty ? insert(node) : isLegacy || !(0, _fg.fg)('platform_editor_adf_with_localid') ? (0, _createWrapSelectionTransaction.createWrapSelectionTransaction)({
|
|
56
56
|
state: state,
|
|
57
57
|
type: node.type
|
|
58
58
|
}) : (0, _commands2.wrapSelectionAndSetExpandedState)(state, node);
|
|
59
59
|
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.attachAnalyticsEvent({
|
|
60
|
-
action:
|
|
61
|
-
actionSubject:
|
|
62
|
-
actionSubjectId: node.type === state.schema.nodes.nestedExpand ?
|
|
60
|
+
action: _enums.ACTION.INSERTED,
|
|
61
|
+
actionSubject: _enums.ACTION_SUBJECT.DOCUMENT,
|
|
62
|
+
actionSubjectId: node.type === state.schema.nodes.nestedExpand ? _enums.ACTION_SUBJECT_ID.NESTED_EXPAND : _enums.ACTION_SUBJECT_ID.EXPAND,
|
|
63
63
|
attributes: {
|
|
64
|
-
inputMethod: isLegacy ?
|
|
64
|
+
inputMethod: isLegacy ? _enums.INPUT_METHOD.QUICK_INSERT : source
|
|
65
65
|
},
|
|
66
|
-
eventType:
|
|
66
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
67
67
|
})(tr);
|
|
68
68
|
return tr;
|
|
69
69
|
}, [api, isLegacy]);
|
|
70
70
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
71
|
-
description: formatMessage(
|
|
71
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.expandDescription),
|
|
72
72
|
iconBefore: /*#__PURE__*/_react.default.createElement(_expandElement.default, {
|
|
73
73
|
label: ""
|
|
74
74
|
}),
|
|
75
75
|
isDisabled: editorDisabled || mode === 'view',
|
|
76
76
|
onSelect: onSelect,
|
|
77
77
|
preview: preview,
|
|
78
|
-
title: formatMessage(
|
|
78
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.expand)
|
|
79
79
|
});
|
|
80
80
|
};
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getExpandQuickInsertComponents = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
11
11
|
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
|
|
12
12
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
13
13
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
@@ -30,9 +30,9 @@ var getExpandQuickInsertComponents = exports.getExpandQuickInsertComponents = fu
|
|
|
30
30
|
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
|
|
31
31
|
var formatMessage = _ref2.formatMessage;
|
|
32
32
|
return {
|
|
33
|
-
description: formatMessage(
|
|
33
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.expandDescription),
|
|
34
34
|
keywords: ['accordion', 'collapse'],
|
|
35
|
-
title: formatMessage(
|
|
35
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.expand)
|
|
36
36
|
};
|
|
37
37
|
}),
|
|
38
38
|
component: function component() {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { MODE, PLATFORMS } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
4
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
5
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
6
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
5
7
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
6
|
-
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
7
9
|
import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
10
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
9
11
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -4,11 +4,14 @@ import React from 'react';
|
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
5
|
import { keyName } from 'w3c-keyname';
|
|
6
6
|
import { BLOCK_CONTROLS_DRAG_HANDLE } from '@atlaskit/editor-common/block-controls/surface-keys';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
8
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
9
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
10
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
11
|
+
import { messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
12
|
+
import { isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
11
13
|
import { applyContentVisibility, estimateExpandIntrinsicHeight } from '@atlaskit/editor-common/utils/content-visibility';
|
|
14
|
+
import { closestElement } from '@atlaskit/editor-common/utils/dom';
|
|
12
15
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
13
16
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
14
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { expandWithNestedExpand } from '@atlaskit/adf-schema/expand';
|
|
3
3
|
import { nestedExpand } from '@atlaskit/adf-schema/nested-expand';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
5
|
import { IconExpand } from '@atlaskit/editor-common/assets';
|
|
6
|
-
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
7
|
+
import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
|
|
8
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
9
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
9
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
11
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
11
12
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getNextNodeExpandPos } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { backspace, bindKeymapWithCommand, moveDown, moveLeft, moveRight, moveUp, tab } from '@atlaskit/editor-common/keymaps';
|
|
3
|
-
import {
|
|
3
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
4
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
5
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
4
6
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
5
7
|
import { isEmptyNode, isPositionNearTableRow } from '@atlaskit/editor-common/utils';
|
|
6
8
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
3
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
4
4
|
import { findExpand, transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { setExpandRef } from '../commands';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
1
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
2
2
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import reducer from '../reducer';
|
|
@@ -8,9 +8,9 @@ import React, { useCallback } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
11
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
12
|
-
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
|
|
13
|
-
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
12
|
+
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
13
|
+
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles/constants';
|
|
14
14
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
15
15
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
16
16
|
export const withTooltip = WrapperComponent => {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
3
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { MODE, PLATFORMS } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
5
6
|
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
8
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
9
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
8
10
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
9
11
|
// oxlint-disable-next-line import/no-duplicates
|
|
10
12
|
|
|
11
|
-
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
13
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
12
14
|
import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
13
15
|
import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
14
16
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -5,10 +5,13 @@ import { v4 as uuid } from 'uuid';
|
|
|
5
5
|
import { keyName } from 'w3c-keyname';
|
|
6
6
|
import { BLOCK_CONTROLS_DRAG_HANDLE } from '@atlaskit/editor-common/block-controls/surface-keys';
|
|
7
7
|
import { expandedState, isExpandCollapsed } from '@atlaskit/editor-common/expand';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
9
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
10
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
11
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
12
|
+
import { isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
11
13
|
import { applyContentVisibility, estimateExpandIntrinsicHeight } from '@atlaskit/editor-common/utils/content-visibility';
|
|
14
|
+
import { closestElement } from '@atlaskit/editor-common/utils/dom';
|
|
12
15
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
13
16
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
14
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { expandWithNestedExpand, expandWithNestedExpandLocalId } from '@atlaskit/adf-schema/expand';
|
|
3
3
|
import { nestedExpand, nestedExpandWithLocalId } from '@atlaskit/adf-schema/nested-expand';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
5
|
import { IconExpand } from '@atlaskit/editor-common/assets';
|
|
6
|
-
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
7
|
+
import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
|
|
8
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
9
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
9
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getNextNodeExpandPos, isExpandCollapsed } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { backspace, bindKeymapWithCommand, moveDown, moveLeft, moveRight, moveUp, tab } from '@atlaskit/editor-common/keymaps';
|
|
3
|
-
import {
|
|
3
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
4
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
5
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
4
6
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
5
7
|
import { isEmptyNode, isPositionNearTableRow } from '@atlaskit/editor-common/utils';
|
|
6
8
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
3
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
4
4
|
import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -8,9 +8,9 @@ import React, { useCallback } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
11
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
12
|
-
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
|
|
13
|
-
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
12
|
+
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
13
|
+
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles/constants';
|
|
14
14
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
15
15
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
16
16
|
function withTooltip(Component) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
2
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import { expandMessages } from '@atlaskit/editor-common/ui';
|
|
2
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
3
|
+
import { messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
4
4
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
export const buildExpandClassName = (type, expanded) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
6
6
|
import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
|
|
7
7
|
const NODE_NAME = 'expand';
|
|
8
8
|
const ExpandBlockMenuItem = ({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import {
|
|
5
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
6
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
7
6
|
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
8
|
-
import {
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
9
9
|
import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { createExpandNode as createLegacyExpandNode } from '../../legacyExpand/commands';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
3
3
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
4
4
|
import { EXPAND_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
@@ -2,11 +2,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
5
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import { MODE, PLATFORMS } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
7
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
8
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
9
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
8
10
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
9
|
-
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
11
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
10
12
|
import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
13
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
12
14
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -8,11 +8,14 @@ import React from 'react';
|
|
|
8
8
|
import { v4 as uuid } from 'uuid';
|
|
9
9
|
import { keyName } from 'w3c-keyname';
|
|
10
10
|
import { BLOCK_CONTROLS_DRAG_HANDLE } from '@atlaskit/editor-common/block-controls/surface-keys';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
12
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
13
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
14
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
15
|
+
import { messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
16
|
+
import { isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
15
17
|
import { applyContentVisibility, estimateExpandIntrinsicHeight } from '@atlaskit/editor-common/utils/content-visibility';
|
|
18
|
+
import { closestElement } from '@atlaskit/editor-common/utils/dom';
|
|
16
19
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
17
20
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
18
21
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
@@ -4,11 +4,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { expandWithNestedExpand } from '@atlaskit/adf-schema/expand';
|
|
6
6
|
import { nestedExpand } from '@atlaskit/adf-schema/nested-expand';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
8
8
|
import { IconExpand } from '@atlaskit/editor-common/assets';
|
|
9
|
-
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
10
|
+
import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
|
|
11
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
12
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
12
13
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
14
15
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getNextNodeExpandPos } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { backspace, bindKeymapWithCommand, moveDown, moveLeft, moveRight, moveUp, tab } from '@atlaskit/editor-common/keymaps';
|
|
3
|
-
import {
|
|
3
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
4
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
5
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
4
6
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
5
7
|
import { isEmptyNode, isPositionNearTableRow } from '@atlaskit/editor-common/utils';
|
|
6
8
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
3
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
4
4
|
import { findExpand, transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { setExpandRef } from '../commands';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
1
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
2
2
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import reducer from '../reducer';
|
|
@@ -20,9 +20,9 @@ import React, { useCallback } from 'react';
|
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
21
|
import { jsx } from '@emotion/react';
|
|
22
22
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
23
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
24
|
-
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
|
|
25
|
-
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
23
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
24
|
+
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
25
|
+
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles/constants';
|
|
26
26
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
27
27
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
28
28
|
export var withTooltip = function withTooltip(WrapperComponent) {
|
|
@@ -4,14 +4,16 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
5
5
|
import { v4 as uuid } from 'uuid';
|
|
6
6
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
8
|
+
import { MODE, PLATFORMS } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
8
9
|
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
10
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
11
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
12
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
11
13
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
12
14
|
// oxlint-disable-next-line import/no-duplicates
|
|
13
15
|
|
|
14
|
-
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
16
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
15
17
|
import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
18
|
import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
17
19
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -7,10 +7,13 @@ import { v4 as uuid } from 'uuid';
|
|
|
7
7
|
import { keyName } from 'w3c-keyname';
|
|
8
8
|
import { BLOCK_CONTROLS_DRAG_HANDLE } from '@atlaskit/editor-common/block-controls/surface-keys';
|
|
9
9
|
import { expandedState, isExpandCollapsed } from '@atlaskit/editor-common/expand';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
11
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
12
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
13
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
14
|
+
import { isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
13
15
|
import { applyContentVisibility, estimateExpandIntrinsicHeight } from '@atlaskit/editor-common/utils/content-visibility';
|
|
16
|
+
import { closestElement } from '@atlaskit/editor-common/utils/dom';
|
|
14
17
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
15
18
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
16
19
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
@@ -4,11 +4,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { expandWithNestedExpand, expandWithNestedExpandLocalId } from '@atlaskit/adf-schema/expand';
|
|
6
6
|
import { nestedExpand, nestedExpandWithLocalId } from '@atlaskit/adf-schema/nested-expand';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
8
8
|
import { IconExpand } from '@atlaskit/editor-common/assets';
|
|
9
|
-
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
10
|
+
import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
|
|
11
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
12
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
12
13
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
15
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getNextNodeExpandPos, isExpandCollapsed } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { backspace, bindKeymapWithCommand, moveDown, moveLeft, moveRight, moveUp, tab } from '@atlaskit/editor-common/keymaps';
|
|
3
|
-
import {
|
|
3
|
+
import { Side } from '@atlaskit/editor-common/selection';
|
|
4
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
5
|
+
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection/types';
|
|
4
6
|
import { findExpand } from '@atlaskit/editor-common/transforms';
|
|
5
7
|
import { isEmptyNode, isPositionNearTableRow } from '@atlaskit/editor-common/utils';
|
|
6
8
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
3
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
4
4
|
import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -13,9 +13,9 @@ import React, { useCallback } from 'react';
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
14
14
|
import { jsx } from '@emotion/react';
|
|
15
15
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
16
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
17
|
-
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
|
|
18
|
-
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
16
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
17
|
+
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
18
|
+
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles/constants';
|
|
19
19
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
20
20
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
21
21
|
function withTooltip(Component) {
|
|
@@ -2,8 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
5
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
6
|
-
import { expandMessages } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
6
|
+
import { messages as expandMessages } from '@atlaskit/editor-common/ui-expand';
|
|
7
7
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
9
|
export var buildExpandClassName = function buildExpandClassName(type, expanded) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
6
6
|
import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
|
|
7
7
|
var NODE_NAME = 'expand';
|
|
8
8
|
var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import {
|
|
5
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
6
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
7
6
|
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
8
|
-
import {
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils/create-wrap-selection-transaction';
|
|
9
9
|
import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { createExpandNode as createLegacyExpandNode } from '../../legacyExpand/commands';
|