@atlaskit/editor-plugin-block-menu 25.1.1 → 25.1.3
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/editor-actions/isTransformToTargetDisabled.js +5 -5
- package/dist/cjs/editor-actions/transformSourceRegistry.js +3 -3
- package/dist/cjs/editor-commands/transform-analytics.js +12 -12
- package/dist/cjs/editor-commands/transform-node-utils/utils.js +2 -2
- package/dist/cjs/editor-commands/transformNode.js +7 -7
- package/dist/cjs/pm-plugins/experiences/block-menu-experiences.js +43 -38
- package/dist/cjs/pm-plugins/experiences/experience-check-utils.js +3 -3
- package/dist/cjs/pm-plugins/keymap.js +4 -3
- package/dist/cjs/ui/MenuSection.js +2 -2
- package/dist/cjs/ui/block-menu-components.js +48 -48
- package/dist/cjs/ui/block-menu-renderer/fallbacks.js +8 -6
- package/dist/cjs/ui/block-menu.js +28 -26
- package/dist/cjs/ui/copy-link.js +14 -13
- package/dist/cjs/ui/copy-section.js +2 -2
- package/dist/cjs/ui/delete-button.js +17 -17
- package/dist/cjs/ui/delete-section.js +2 -2
- package/dist/cjs/ui/flag.js +4 -4
- package/dist/cjs/ui/format-menu-nested.js +8 -8
- package/dist/cjs/ui/format-menu-section.js +2 -2
- package/dist/cjs/ui/hooks/useSuggestedItems.js +2 -2
- package/dist/cjs/ui/move-down.js +14 -14
- package/dist/cjs/ui/move-up.js +14 -14
- package/dist/cjs/ui/suggested-items-menu-section.js +4 -4
- package/dist/cjs/ui/utils/checkHasPreviousSectionContent.js +4 -4
- package/dist/cjs/ui/utils/copyLink.js +7 -7
- package/dist/cjs/ui/utils/fixBlockMenuPositionAndScroll.js +5 -5
- package/dist/cjs/ui/utils/getSuggestedItemsFromSelection.js +4 -4
- package/dist/cjs/ui/utils/isNestedNode.js +2 -2
- package/dist/cjs/ui/utils/suggested-items-rank.js +1 -2
- package/dist/es2019/editor-actions/isTransformToTargetDisabled.js +1 -1
- package/dist/es2019/editor-actions/transformSourceRegistry.js +1 -1
- package/dist/es2019/editor-commands/transform-analytics.js +2 -2
- package/dist/es2019/editor-commands/transform-node-utils/utils.js +1 -1
- package/dist/es2019/editor-commands/transformNode.js +2 -2
- package/dist/es2019/pm-plugins/experiences/block-menu-experiences.js +8 -3
- package/dist/es2019/pm-plugins/experiences/experience-check-utils.js +1 -1
- package/dist/es2019/pm-plugins/keymap.js +3 -2
- package/dist/es2019/ui/MenuSection.js +1 -1
- package/dist/es2019/ui/block-menu-components.js +4 -4
- package/dist/es2019/ui/block-menu-renderer/fallbacks.js +4 -2
- package/dist/es2019/ui/block-menu.js +10 -8
- package/dist/es2019/ui/copy-link.js +6 -5
- package/dist/es2019/ui/copy-section.js +1 -1
- package/dist/es2019/ui/delete-button.js +5 -5
- package/dist/es2019/ui/delete-section.js +1 -1
- package/dist/es2019/ui/flag.js +2 -2
- package/dist/es2019/ui/format-menu-nested.js +3 -3
- package/dist/es2019/ui/format-menu-section.js +1 -1
- package/dist/es2019/ui/hooks/useSuggestedItems.js +1 -1
- package/dist/es2019/ui/move-down.js +6 -6
- package/dist/es2019/ui/move-up.js +6 -6
- package/dist/es2019/ui/suggested-items-menu-section.js +2 -2
- package/dist/es2019/ui/utils/checkHasPreviousSectionContent.js +1 -1
- package/dist/es2019/ui/utils/copyLink.js +3 -3
- package/dist/es2019/ui/utils/fixBlockMenuPositionAndScroll.js +2 -2
- package/dist/es2019/ui/utils/getSuggestedItemsFromSelection.js +1 -1
- package/dist/es2019/ui/utils/isNestedNode.js +1 -1
- package/dist/es2019/ui/utils/suggested-items-rank.js +1 -2
- package/dist/esm/editor-actions/isTransformToTargetDisabled.js +1 -1
- package/dist/esm/editor-actions/transformSourceRegistry.js +1 -1
- package/dist/esm/editor-commands/transform-analytics.js +2 -2
- package/dist/esm/editor-commands/transform-node-utils/utils.js +1 -1
- package/dist/esm/editor-commands/transformNode.js +2 -2
- package/dist/esm/pm-plugins/experiences/block-menu-experiences.js +8 -3
- package/dist/esm/pm-plugins/experiences/experience-check-utils.js +1 -1
- package/dist/esm/pm-plugins/keymap.js +3 -2
- package/dist/esm/ui/MenuSection.js +1 -1
- package/dist/esm/ui/block-menu-components.js +4 -4
- package/dist/esm/ui/block-menu-renderer/fallbacks.js +4 -2
- package/dist/esm/ui/block-menu.js +10 -8
- package/dist/esm/ui/copy-link.js +6 -5
- package/dist/esm/ui/copy-section.js +1 -1
- package/dist/esm/ui/delete-button.js +5 -5
- package/dist/esm/ui/delete-section.js +1 -1
- package/dist/esm/ui/flag.js +2 -2
- package/dist/esm/ui/format-menu-nested.js +3 -3
- package/dist/esm/ui/format-menu-section.js +1 -1
- package/dist/esm/ui/hooks/useSuggestedItems.js +1 -1
- package/dist/esm/ui/move-down.js +6 -6
- package/dist/esm/ui/move-up.js +6 -6
- package/dist/esm/ui/suggested-items-menu-section.js +2 -2
- package/dist/esm/ui/utils/checkHasPreviousSectionContent.js +1 -1
- package/dist/esm/ui/utils/copyLink.js +3 -3
- package/dist/esm/ui/utils/fixBlockMenuPositionAndScroll.js +2 -2
- package/dist/esm/ui/utils/getSuggestedItemsFromSelection.js +1 -1
- package/dist/esm/ui/utils/isNestedNode.js +1 -1
- package/dist/esm/ui/utils/suggested-items-rank.js +1 -2
- package/dist/types/blockMenuPluginType.d.ts +7 -6
- package/dist/types/editor-commands/transform-analytics.d.ts +1 -1
- package/dist/types/editor-commands/transformInlineNode.d.ts +2 -1
- package/dist/types/editor-commands/transformNode.d.ts +2 -1
- package/dist/types/editor-commands/types.d.ts +1 -1
- package/dist/types/pm-plugins/experiences/block-menu-experiences.d.ts +1 -1
- package/dist/types/pm-plugins/experiences/experience-check-utils.d.ts +1 -1
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/ui/block-menu-components.d.ts +1 -1
- package/dist/types/ui/block-menu-provider.d.ts +1 -1
- package/dist/types/ui/block-menu.d.ts +1 -1
- package/dist/types/ui/copy-link.d.ts +1 -1
- package/dist/types/ui/delete-button.d.ts +1 -1
- package/dist/types/ui/flag.d.ts +1 -1
- package/dist/types/ui/format-menu-nested.d.ts +1 -1
- package/dist/types/ui/format-menu-section.d.ts +1 -1
- package/dist/types/ui/hooks/useSuggestedItems.d.ts +1 -1
- package/dist/types/ui/move-down.d.ts +1 -1
- package/dist/types/ui/move-up.d.ts +1 -1
- package/dist/types/ui/suggested-items-menu-section.d.ts +1 -1
- package/dist/types/ui/suggested-menu-items.d.ts +1 -1
- package/dist/types/ui/utils/checkHasPreviousSectionContent.d.ts +1 -1
- package/dist/types/ui/utils/checkIsFormatMenuHidden.d.ts +1 -1
- package/dist/types/ui/utils/createMenuItemsMap.d.ts +1 -1
- package/docs/0-intro.tsx +1 -1
- package/package.json +2 -2
|
@@ -4,16 +4,18 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useContext, useEffect, useRef } from 'react';
|
|
5
5
|
import { injectIntl } from 'react-intl';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
8
8
|
import { surfaceDragHandleElementStore } from '@atlaskit/editor-common/block-controls/surface-drag-handle-element';
|
|
9
|
-
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
9
|
+
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
10
10
|
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
11
|
-
import
|
|
12
|
-
import { DRAG_HANDLE_SELECTOR, NESTED_DROPDOWN_MENU, DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { OutsideClickTargetRefContext
|
|
16
|
-
import
|
|
11
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
12
|
+
import { DRAG_HANDLE_SELECTOR, NESTED_DROPDOWN_MENU, DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles/drag-handle';
|
|
13
|
+
import { ArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider';
|
|
14
|
+
import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
|
|
15
|
+
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
16
|
+
import withReactEditorViewOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
17
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
18
|
+
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
17
19
|
import { ToolbarMenuContainer } from '@atlaskit/editor-toolbar/toolbar-menu-container';
|
|
18
20
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
19
21
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
5
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
6
5
|
import { copyLinkToBlock, formatShortcut } from '@atlaskit/editor-common/keymaps';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
9
|
+
import { ToolbarKeyboardShortcutHint } from '@atlaskit/editor-toolbar/toolbar-keyboard-shortcut-hint';
|
|
9
10
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
10
11
|
import { FLAG_ID } from '../blockMenuPluginType';
|
|
11
12
|
import { blockMenuPluginKey } from '../pm-plugins/main';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useCallback, useEffect } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
5
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { deleteSelectedRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection';
|
|
7
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
5
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
6
|
+
import { deleteSelectedRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection/utils';
|
|
7
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
8
8
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
|
|
10
10
|
import { Box } from '@atlaskit/primitives/box';
|
package/dist/es2019/ui/flag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
4
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
5
5
|
import AutoDismissFlag from '@atlaskit/flag/auto-dismiss-flag';
|
|
6
6
|
import AkFlag from '@atlaskit/flag/flag';
|
|
7
7
|
import { FlagGroup } from '@atlaskit/flag/flag-group';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
5
|
+
import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-nested-dropdown-menu';
|
|
6
6
|
import ChangesIcon from '@atlaskit/icon/core/changes';
|
|
7
7
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
2
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
3
3
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
4
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
5
|
import { checkIsFormatMenuHidden } from './utils/checkIsFormatMenuHidden';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
3
3
|
import { createMenuItemsMap } from '../utils/createMenuItemsMap';
|
|
4
4
|
import { getSuggestedItemsFromSelection } from '../utils/getSuggestedItemsFromSelection';
|
|
5
5
|
export const useSuggestedItems = api => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
3
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
7
|
+
import { DIRECTION } from '@atlaskit/editor-common/types/block-controls';
|
|
8
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
9
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
10
10
|
import ArrowDownIcon from '@atlaskit/icon/core/arrow-down';
|
|
11
11
|
import { useBlockMenu } from './block-menu-provider';
|
|
12
12
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
3
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
7
|
+
import { DIRECTION } from '@atlaskit/editor-common/types/block-controls';
|
|
8
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
9
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
10
10
|
import ArrowUpIcon from '@atlaskit/icon/core/arrow-up';
|
|
11
11
|
import { useBlockMenu } from './block-menu-provider';
|
|
12
12
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
4
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
5
5
|
import { useSuggestedItems } from './hooks/useSuggestedItems';
|
|
6
6
|
import { hasCreateSectionContent, hasStructureSectionContent } from './utils/checkHasPreviousSectionContent';
|
|
7
7
|
export const SuggestedItemsMenuSection = /*#__PURE__*/React.memo(({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu';
|
|
1
|
+
import { TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
2
2
|
import { buildChildrenMap, getChildrenMapKey, willComponentRender } from '../block-menu-renderer/utils';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createBlockLinkHashValue, DEFAULT_BLOCK_LINK_HASH_PREFIX } from '@atlaskit/editor-common/block-menu';
|
|
1
|
+
import { createBlockLinkHashValue, DEFAULT_BLOCK_LINK_HASH_PREFIX } from '@atlaskit/editor-common/block-menu/block-link';
|
|
2
2
|
import { copyToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
3
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
|
-
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection';
|
|
3
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
4
|
+
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection/utils';
|
|
5
5
|
export const copyLink = async ({
|
|
6
6
|
getLinkPath,
|
|
7
7
|
blockLinkHashPrefix = DEFAULT_BLOCK_LINK_HASH_PREFIX,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
2
|
-
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
3
|
-
import { DRAG_HANDLE_SELECTOR } from '@atlaskit/editor-common/styles';
|
|
2
|
+
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
3
|
+
import { DRAG_HANDLE_SELECTOR } from '@atlaskit/editor-common/styles/drag-handle';
|
|
4
4
|
const POPUP_WRAPPER_TEST_ID = 'popup-wrapper';
|
|
5
5
|
const EDITOR_CONTENT_CONTAINER_SELECTOR = '[data-testid="editor-content-container"]';
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection';
|
|
1
|
+
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection/utils';
|
|
2
2
|
import { getBlockNodesInRange } from '../../editor-commands/transform-node-utils/utils';
|
|
3
3
|
import { getSortedSuggestedItems } from '../utils/suggested-items-rank';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { CellSelection } from '@atlaskit/editor-tables';
|
|
2
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Determines if a node is nested (not at top-level) based on its depth and context.
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
18
|
-
import { TRANSFORM_STRUCTURE_STATUS_MENU_ITEM } from '@atlaskit/editor-common/block-menu/key';
|
|
17
|
+
import { TRANSFORM_STRUCTURE_STATUS_MENU_ITEM, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM } from '@atlaskit/editor-common/block-menu/key';
|
|
19
18
|
export const BLOCK_MENU_NODE_TYPES = {
|
|
20
19
|
PARAGRAPH: 'paragraph',
|
|
21
20
|
EXPAND: 'expand',
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
3
3
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
-
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection';
|
|
5
|
+
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection/utils';
|
|
6
6
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
8
|
import { isTransformDisabledBasedOnStepsConfig } from '../editor-commands/transform-node-utils/transform';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
1
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
2
2
|
export var createBlockMenuTransformSourceRegistry = function createBlockMenuTransformSourceRegistry() {
|
|
3
3
|
var transforms = new Map();
|
|
4
4
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2
2
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
3
3
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
6
6
|
var sourceTypeName = function sourceTypeName(sourceNodes) {
|
|
7
7
|
return sourceNodes.length === 1 ? sourceNodes[0].type.name : 'multiple';
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
2
2
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import { CellSelection } from '@atlaskit/editor-tables';
|
|
4
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
6
|
import { NODE_CATEGORY_BY_TYPE } from './types';
|
|
7
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
3
|
-
import { expandSelectionToBlockRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection';
|
|
3
|
+
import { expandSelectionToBlockRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection/utils';
|
|
4
4
|
import { Fragment, Node } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { Mapping, StepMap } from '@atlaskit/editor-prosemirror/transform';
|
|
7
|
-
import { CellSelection } from '@atlaskit/editor-tables';
|
|
7
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
8
8
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
9
|
import { getSingleTransformSourceNode, isExtensionTransformSource } from '../editor-actions/transformSource';
|
|
10
10
|
import { isNestedNode } from '../ui/utils/isNestedNode';
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { BLOCK_MENU_ACTION_TEST_ID, BLOCK_MENU_TEST_ID, EXTENSION_MENU_ITEM_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
5
|
-
import {
|
|
3
|
+
import { ACTION, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { BLOCK_MENU_ACTION_TEST_ID, BLOCK_MENU_TEST_ID, EXTENSION_MENU_ITEM_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
5
|
+
import { getPopupContainerFromEditorView, getSelectionAncestorDOM } from '@atlaskit/editor-common/experiences';
|
|
6
|
+
import { EXPERIENCE_ID } from '@atlaskit/editor-common/experiences/consts';
|
|
7
|
+
import { Experience } from '@atlaskit/editor-common/experiences/Experience';
|
|
8
|
+
import { ExperienceCheckDomMutation } from '@atlaskit/editor-common/experiences/ExperienceCheckDomMutation';
|
|
9
|
+
import { ExperienceCheckPopupMutation } from '@atlaskit/editor-common/experiences/ExperienceCheckPopupMutation';
|
|
10
|
+
import { ExperienceCheckTimeout } from '@atlaskit/editor-common/experiences/ExperienceCheckTimeout';
|
|
6
11
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
12
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
13
|
import { handleDeleteDomMutation, handleMoveDomMutation, handleTransformDomMutation, isBlockMenuVisible, isDragHandleElement } from './experience-check-utils';
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
3
3
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
-
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
5
|
+
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
6
6
|
import { popupWithNestedElement } from '@atlaskit/editor-common/experiences';
|
|
7
7
|
/**
|
|
8
8
|
* Checks if the given element or any of its ancestors is a drag handle element.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { keymap } from '@atlaskit/editor-common/keymap';
|
|
2
|
+
import { bindKeymapWithCommand, copyLinkToBlock } from '@atlaskit/editor-common/keymaps';
|
|
3
|
+
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection/utils';
|
|
3
4
|
import { FLAG_ID } from '../blockMenuPluginType';
|
|
4
5
|
import { blockMenuPluginKey } from '../pm-plugins/main';
|
|
5
6
|
import { copyLink } from '../ui/utils/copyLink';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
4
4
|
export var MenuSection = function MenuSection(_ref) {
|
|
5
5
|
var children = _ref.children,
|
|
6
6
|
title = _ref.title,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { TRANSFORM_TEXTFORMATTING_MENU_SECTION, BLOCK_ACTIONS_COPY_MENU_SECTION, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM, BLOCK_ACTIONS_MENU_SECTION, DELETE_MENU_SECTION, DELETE_MENU_ITEM, POSITION_MENU_SECTION, POSITION_MOVE_DOWN_MENU_ITEM, POSITION_MOVE_UP_MENU_ITEM, TRANSFORM_MENU_ITEM, TRANSFORM_MENU_SECTION, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_SUGGESTED_MENU_ITEM } from '@atlaskit/editor-common/block-menu/key';
|
|
4
|
+
import { BLOCK_ACTIONS_COPY_MENU_SECTION_RANK, DELETE_MENU_SECTION_RANK, POSITION_MENU_SECTION_RANK, TRANSFORM_MENU_ITEM_RANK, TRANSFORM_MENU_SECTION_RANK, MAIN_BLOCK_MENU_SECTION_RANK, TRANSFORM_SUGGESTED_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
|
|
5
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
6
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
7
7
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
8
|
import { buildChildrenMap, getChildrenMapKey, willComponentRender } from './block-menu-renderer/utils';
|
|
9
9
|
import { CopyLinkDropdownItem } from './copy-link';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import { ToolbarDropdownItem
|
|
3
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
4
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
5
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
6
|
+
import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-nested-dropdown-menu';
|
|
5
7
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
6
8
|
import { useBlockMenuTargetVisibility } from '../block-menu-target-visibility-context';
|
|
7
9
|
var FallbackNestedMenu = function FallbackNestedMenu(_ref) {
|
|
@@ -8,16 +8,18 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import React, { useContext, useEffect, useRef } from 'react';
|
|
9
9
|
import { injectIntl } from 'react-intl';
|
|
10
10
|
import { cx } from '@atlaskit/css';
|
|
11
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
11
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
12
12
|
import { surfaceDragHandleElementStore } from '@atlaskit/editor-common/block-controls/surface-drag-handle-element';
|
|
13
|
-
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
13
|
+
import { BLOCK_MENU_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
14
14
|
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
15
|
-
import
|
|
16
|
-
import { DRAG_HANDLE_SELECTOR, NESTED_DROPDOWN_MENU, DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { OutsideClickTargetRefContext
|
|
20
|
-
import
|
|
15
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
16
|
+
import { DRAG_HANDLE_SELECTOR, NESTED_DROPDOWN_MENU, DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles/drag-handle';
|
|
17
|
+
import { ArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider';
|
|
18
|
+
import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
|
|
19
|
+
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
20
|
+
import withReactEditorViewOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
21
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
22
|
+
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
21
23
|
import { ToolbarMenuContainer } from '@atlaskit/editor-toolbar/toolbar-menu-container';
|
|
22
24
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
23
25
|
import { Box } from '@atlaskit/primitives/compiled';
|
package/dist/esm/ui/copy-link.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
5
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
6
5
|
import { copyLinkToBlock, formatShortcut } from '@atlaskit/editor-common/keymaps';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
9
|
+
import { ToolbarKeyboardShortcutHint } from '@atlaskit/editor-toolbar/toolbar-keyboard-shortcut-hint';
|
|
9
10
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
10
11
|
import { FLAG_ID } from '../blockMenuPluginType';
|
|
11
12
|
import { blockMenuPluginKey } from '../pm-plugins/main';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
2
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
3
3
|
export var CopySection = function CopySection(_ref) {
|
|
4
4
|
var children = _ref.children;
|
|
5
5
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useCallback, useEffect } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
5
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { deleteSelectedRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection';
|
|
7
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
5
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
6
|
+
import { deleteSelectedRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection/utils';
|
|
7
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
8
8
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
|
|
10
10
|
import { Box } from '@atlaskit/primitives/box';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
2
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
3
3
|
export var DeleteSection = function DeleteSection(_ref) {
|
|
4
4
|
var children = _ref.children;
|
|
5
5
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
|
package/dist/esm/ui/flag.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
5
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
6
6
|
import AutoDismissFlag from '@atlaskit/flag/auto-dismiss-flag';
|
|
7
7
|
import AkFlag from '@atlaskit/flag/flag';
|
|
8
8
|
import { FlagGroup } from '@atlaskit/flag/flag-group';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
5
|
+
import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-nested-dropdown-menu';
|
|
6
6
|
import ChangesIcon from '@atlaskit/icon/core/changes';
|
|
7
7
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
2
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
3
3
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
4
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
5
|
import { checkIsFormatMenuHidden } from './utils/checkIsFormatMenuHidden';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
3
3
|
import { createMenuItemsMap } from '../utils/createMenuItemsMap';
|
|
4
4
|
import { getSuggestedItemsFromSelection } from '../utils/getSuggestedItemsFromSelection';
|
|
5
5
|
export var useSuggestedItems = function useSuggestedItems(api) {
|
package/dist/esm/ui/move-down.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
3
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
7
|
+
import { DIRECTION } from '@atlaskit/editor-common/types/block-controls';
|
|
8
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
9
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
10
10
|
import ArrowDownIcon from '@atlaskit/icon/core/arrow-down';
|
|
11
11
|
import { useBlockMenu } from './block-menu-provider';
|
|
12
12
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
package/dist/esm/ui/move-up.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { injectIntl, useIntl } from 'react-intl';
|
|
3
3
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { BLOCK_MENU_ACTION_TEST_ID } from '@atlaskit/editor-common/block-menu/key';
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/messages/block-menu';
|
|
7
|
+
import { DIRECTION } from '@atlaskit/editor-common/types/block-controls';
|
|
8
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
9
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
10
10
|
import ArrowUpIcon from '@atlaskit/icon/core/arrow-up';
|
|
11
11
|
import { useBlockMenu } from './block-menu-provider';
|
|
12
12
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
|
|
4
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
5
5
|
import { useSuggestedItems } from './hooks/useSuggestedItems';
|
|
6
6
|
import { hasCreateSectionContent, hasStructureSectionContent } from './utils/checkHasPreviousSectionContent';
|
|
7
7
|
export var SuggestedItemsMenuSection = /*#__PURE__*/React.memo(function (_ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu';
|
|
1
|
+
import { TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
2
2
|
import { buildChildrenMap, getChildrenMapKey, willComponentRender } from '../block-menu-renderer/utils';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { createBlockLinkHashValue, DEFAULT_BLOCK_LINK_HASH_PREFIX } from '@atlaskit/editor-common/block-menu';
|
|
3
|
+
import { createBlockLinkHashValue, DEFAULT_BLOCK_LINK_HASH_PREFIX } from '@atlaskit/editor-common/block-menu/block-link';
|
|
4
4
|
import { copyToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
5
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
6
|
-
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection';
|
|
5
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
6
|
+
import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection/utils';
|
|
7
7
|
export var copyLink = /*#__PURE__*/function () {
|
|
8
8
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
9
9
|
var getLinkPath, _ref$blockLinkHashPre, blockLinkHashPrefix, selection, blockRange, node, path, url, href, _t;
|