@atlaskit/editor-core 191.6.0 → 191.7.0
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 +21 -0
- package/afm-cc/tsconfig.json +1 -211
- package/dist/cjs/composable-editor/editor-internal.js +4 -0
- package/dist/cjs/composable-editor/editor.js +2 -2
- package/dist/cjs/composable-editor/hooks/useProviders.js +57 -0
- package/dist/cjs/labs-next.js +1 -1
- package/dist/cjs/presets/default.js +35 -32
- package/dist/cjs/presets/universal.js +70 -70
- package/dist/cjs/test-utils.js +2 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/expand.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +5 -5
- package/dist/cjs/ui/ContentStyles/layout.js +2 -2
- package/dist/cjs/ui/ToolbarFeedback/index.js +6 -7
- package/dist/cjs/ui/WithHelpTrigger/index.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +4 -0
- package/dist/es2019/composable-editor/editor.js +1 -1
- package/dist/es2019/composable-editor/hooks/useProviders.js +28 -0
- package/dist/es2019/index.js +2 -2
- package/dist/es2019/labs-next.js +1 -1
- package/dist/es2019/presets/default.js +32 -29
- package/dist/es2019/presets/universal.js +45 -45
- package/dist/es2019/test-utils.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/expand.js +2 -2
- package/dist/es2019/ui/ContentStyles/index.js +5 -5
- package/dist/es2019/ui/ContentStyles/layout.js +2 -2
- package/dist/es2019/ui/ToolbarFeedback/index.js +2 -3
- package/dist/es2019/ui/WithHelpTrigger/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +4 -0
- package/dist/esm/composable-editor/editor.js +1 -1
- package/dist/esm/composable-editor/hooks/useProviders.js +50 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/labs-next.js +1 -1
- package/dist/esm/presets/default.js +32 -29
- package/dist/esm/presets/universal.js +45 -45
- package/dist/esm/test-utils.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/expand.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +5 -5
- package/dist/esm/ui/ContentStyles/layout.js +2 -2
- package/dist/esm/ui/ToolbarFeedback/index.js +6 -7
- package/dist/esm/ui/WithHelpTrigger/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/hooks/useProviders.d.ts +14 -0
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -4
- package/dist/types/create-editor/create-preset.d.ts +235 -63
- package/dist/types/index.d.ts +4 -4
- package/dist/types/labs-next.d.ts +1 -1
- package/dist/types/presets/default.d.ts +908 -758
- package/dist/types/presets/universal.d.ts +433 -262
- package/dist/types/presets/useUniversalPreset.d.ts +235 -63
- package/dist/types/types/editor-props.d.ts +12 -12
- package/dist/types/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types/utils/action.d.ts +2 -2
- package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +14 -0
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +3 -4
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +255 -56
- package/dist/types-ts4.5/index.d.ts +4 -4
- package/dist/types-ts4.5/labs-next.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +930 -756
- package/dist/types-ts4.5/presets/universal.d.ts +453 -255
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +255 -56
- package/dist/types-ts4.5/types/editor-props.d.ts +12 -12
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/action.d.ts +2 -2
- package/docs/0-intro.tsx +5 -5
- package/package.json +17 -150
- package/tsconfig.json +196 -166
- package/dist/cjs/presets/types.js +0 -5
- package/dist/es2019/presets/types.js +0 -1
- package/dist/esm/presets/types.js +0 -1
- package/dist/types/presets/types.d.ts +0 -6
- package/dist/types-ts4.5/presets/types.d.ts +0 -6
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
2
|
-
import { alignmentPlugin } from '@atlaskit/editor-
|
|
3
|
-
import { annotationPlugin } from '@atlaskit/editor-
|
|
4
|
-
import { avatarGroupPlugin } from '@atlaskit/editor-
|
|
5
|
-
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-
|
|
6
|
-
import { borderPlugin } from '@atlaskit/editor-
|
|
7
|
-
import { breakoutPlugin } from '@atlaskit/editor-
|
|
8
|
-
import { captionPlugin } from '@atlaskit/editor-
|
|
9
|
-
import { cardPlugin } from '@atlaskit/editor-
|
|
10
|
-
import { codeBidiWarningPlugin } from '@atlaskit/editor-
|
|
11
|
-
import { collabEditPlugin } from '@atlaskit/editor-
|
|
12
|
-
import { contentInsertionPlugin } from '@atlaskit/editor-
|
|
13
|
-
import { contextPanelPlugin } from '@atlaskit/editor-
|
|
14
|
-
import { customAutoformatPlugin } from '@atlaskit/editor-
|
|
15
|
-
import { dataConsumerPlugin } from '@atlaskit/editor-
|
|
16
|
-
import { datePlugin } from '@atlaskit/editor-
|
|
17
|
-
import { emojiPlugin } from '@atlaskit/editor-
|
|
18
|
-
import { expandPlugin } from '@atlaskit/editor-
|
|
19
|
-
import { extensionPlugin } from '@atlaskit/editor-
|
|
20
|
-
import { feedbackDialogPlugin } from '@atlaskit/editor-
|
|
21
|
-
import { findReplacePlugin } from '@atlaskit/editor-
|
|
22
|
-
import { fragmentPlugin } from '@atlaskit/editor-
|
|
23
|
-
import { gridPlugin } from '@atlaskit/editor-
|
|
24
|
-
import { guidelinePlugin } from '@atlaskit/editor-
|
|
25
|
-
import { helpDialogPlugin } from '@atlaskit/editor-
|
|
26
|
-
import { imageUploadPlugin } from '@atlaskit/editor-
|
|
27
|
-
import { indentationPlugin } from '@atlaskit/editor-
|
|
28
|
-
import { insertBlockPlugin } from '@atlaskit/editor-
|
|
29
|
-
import { layoutPlugin } from '@atlaskit/editor-
|
|
30
|
-
import { listPlugin } from '@atlaskit/editor-
|
|
31
|
-
import { loomPlugin } from '@atlaskit/editor-
|
|
32
|
-
import { maxContentSizePlugin } from '@atlaskit/editor-
|
|
33
|
-
import { mediaPlugin } from '@atlaskit/editor-
|
|
34
|
-
import { mentionsPlugin } from '@atlaskit/editor-
|
|
35
|
-
import { panelPlugin } from '@atlaskit/editor-
|
|
36
|
-
import { pasteOptionsToolbarPlugin } from '@atlaskit/editor-
|
|
37
|
-
import { placeholderTextPlugin } from '@atlaskit/editor-
|
|
38
|
-
import { rulePlugin } from '@atlaskit/editor-
|
|
39
|
-
import { saveOnEnterPlugin } from '@atlaskit/editor-
|
|
40
|
-
import { scrollIntoViewPlugin } from '@atlaskit/editor-
|
|
41
|
-
import { statusPlugin } from '@atlaskit/editor-
|
|
42
|
-
import { tablesPlugin } from '@atlaskit/editor-
|
|
43
|
-
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-
|
|
44
|
-
import { textColorPlugin } from '@atlaskit/editor-
|
|
45
|
-
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-
|
|
2
|
+
import { alignmentPlugin } from '@atlaskit/editor-plugins/alignment';
|
|
3
|
+
import { annotationPlugin } from '@atlaskit/editor-plugins/annotation';
|
|
4
|
+
import { avatarGroupPlugin } from '@atlaskit/editor-plugins/avatar-group';
|
|
5
|
+
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugins/before-primary-toolbar';
|
|
6
|
+
import { borderPlugin } from '@atlaskit/editor-plugins/border';
|
|
7
|
+
import { breakoutPlugin } from '@atlaskit/editor-plugins/breakout';
|
|
8
|
+
import { captionPlugin } from '@atlaskit/editor-plugins/caption';
|
|
9
|
+
import { cardPlugin } from '@atlaskit/editor-plugins/card';
|
|
10
|
+
import { codeBidiWarningPlugin } from '@atlaskit/editor-plugins/code-bidi-warning';
|
|
11
|
+
import { collabEditPlugin } from '@atlaskit/editor-plugins/collab-edit';
|
|
12
|
+
import { contentInsertionPlugin } from '@atlaskit/editor-plugins/content-insertion';
|
|
13
|
+
import { contextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
|
|
14
|
+
import { customAutoformatPlugin } from '@atlaskit/editor-plugins/custom-autoformat';
|
|
15
|
+
import { dataConsumerPlugin } from '@atlaskit/editor-plugins/data-consumer';
|
|
16
|
+
import { datePlugin } from '@atlaskit/editor-plugins/date';
|
|
17
|
+
import { emojiPlugin } from '@atlaskit/editor-plugins/emoji';
|
|
18
|
+
import { expandPlugin } from '@atlaskit/editor-plugins/expand';
|
|
19
|
+
import { extensionPlugin } from '@atlaskit/editor-plugins/extension';
|
|
20
|
+
import { feedbackDialogPlugin } from '@atlaskit/editor-plugins/feedback-dialog';
|
|
21
|
+
import { findReplacePlugin } from '@atlaskit/editor-plugins/find-replace';
|
|
22
|
+
import { fragmentPlugin } from '@atlaskit/editor-plugins/fragment';
|
|
23
|
+
import { gridPlugin } from '@atlaskit/editor-plugins/grid';
|
|
24
|
+
import { guidelinePlugin } from '@atlaskit/editor-plugins/guideline';
|
|
25
|
+
import { helpDialogPlugin } from '@atlaskit/editor-plugins/help-dialog';
|
|
26
|
+
import { imageUploadPlugin } from '@atlaskit/editor-plugins/image-upload';
|
|
27
|
+
import { indentationPlugin } from '@atlaskit/editor-plugins/indentation';
|
|
28
|
+
import { insertBlockPlugin } from '@atlaskit/editor-plugins/insert-block';
|
|
29
|
+
import { layoutPlugin } from '@atlaskit/editor-plugins/layout';
|
|
30
|
+
import { listPlugin } from '@atlaskit/editor-plugins/list';
|
|
31
|
+
import { loomPlugin } from '@atlaskit/editor-plugins/loom';
|
|
32
|
+
import { maxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
33
|
+
import { mediaPlugin } from '@atlaskit/editor-plugins/media';
|
|
34
|
+
import { mentionsPlugin } from '@atlaskit/editor-plugins/mentions';
|
|
35
|
+
import { panelPlugin } from '@atlaskit/editor-plugins/panel';
|
|
36
|
+
import { pasteOptionsToolbarPlugin } from '@atlaskit/editor-plugins/paste-options-toolbar';
|
|
37
|
+
import { placeholderTextPlugin } from '@atlaskit/editor-plugins/placeholder-text';
|
|
38
|
+
import { rulePlugin } from '@atlaskit/editor-plugins/rule';
|
|
39
|
+
import { saveOnEnterPlugin } from '@atlaskit/editor-plugins/save-on-enter';
|
|
40
|
+
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugins/scroll-into-view';
|
|
41
|
+
import { statusPlugin } from '@atlaskit/editor-plugins/status';
|
|
42
|
+
import { tablesPlugin } from '@atlaskit/editor-plugins/table';
|
|
43
|
+
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugins/tasks-and-decisions';
|
|
44
|
+
import { textColorPlugin } from '@atlaskit/editor-plugins/text-color';
|
|
45
|
+
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugins/toolbar-lists-indentation';
|
|
46
46
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
47
47
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
48
48
|
import { version as coreVersion } from '../version-wrapper';
|
|
@@ -113,7 +113,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
113
113
|
}], Boolean(props.mentionProvider)).maybeAdd(emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([tablesPlugin, {
|
|
114
114
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
115
115
|
tableResizingEnabled: getBooleanFF('platform.editor.custom-table-width') && ['full-page', 'full-width'].includes(appearance || ''),
|
|
116
|
-
dragAndDropEnabled:
|
|
116
|
+
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage,
|
|
117
117
|
breakoutEnabled: appearance === 'full-page',
|
|
118
118
|
allowContextualMenu: !isMobile,
|
|
119
119
|
fullWidthEnabled: appearance === 'full-width',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
2
|
-
import { basePlugin } from '@atlaskit/editor-
|
|
2
|
+
import { basePlugin } from '@atlaskit/editor-plugins/base';
|
|
3
3
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { createSchema } from './create-editor/create-schema';
|
|
5
5
|
import { sortByOrder } from './create-editor/sort-by-order';
|
|
@@ -10,7 +10,7 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
10
10
|
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
11
11
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
13
|
-
import { tableCommentEditorStyles } from '@atlaskit/editor-
|
|
13
|
+
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
14
14
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { N40 } from '@atlaskit/theme/colors';
|
|
@@ -8,7 +8,7 @@ const beforePrimaryToolbarPluginWrapperStyles = css({
|
|
|
8
8
|
justifyContent: 'flex-end',
|
|
9
9
|
alignItems: 'center'
|
|
10
10
|
});
|
|
11
|
-
// Duplicate of the wrapper from `editor-
|
|
11
|
+
// Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
|
|
12
12
|
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
13
13
|
export const BeforePrimaryToolbarWrapper = props => jsx("div", {
|
|
14
14
|
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
3
|
-
import { tableFullPageEditorStyles } from '@atlaskit/editor-
|
|
4
|
-
import { tableMarginFullWidthMode } from '@atlaskit/editor-
|
|
3
|
+
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
4
|
+
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
5
5
|
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorSwoopCubicBezier, akLayoutGutterOffset, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
7
7
|
import { scrollbarStyles } from '../../styles';
|
|
@@ -3,10 +3,10 @@ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { N40A, N50A,
|
|
6
|
+
import { N100A, N40A, N50A, R300, R50 } from '@atlaskit/theme/colors';
|
|
7
7
|
const EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
8
8
|
const EXPAND_ICON_COLOR = () => css`
|
|
9
|
-
color: ${`var(--ds-icon-subtle, ${
|
|
9
|
+
color: ${`var(--ds-icon-subtle, ${N100A})`};
|
|
10
10
|
`;
|
|
11
11
|
const DANGER_STATE_BACKGROUND_COLOR = `var(--ds-background-danger, ${R50})`;
|
|
12
12
|
const DANGER_STATE_BORDER_COLOR = `var(--ds-border-danger, ${R300})`;
|
|
@@ -9,11 +9,11 @@ import { annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFi
|
|
|
9
9
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
10
10
|
import { codeMarkSharedStyles, linkSharedStyle, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
11
11
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
12
|
-
import { blocktypeStyles } from '@atlaskit/editor-
|
|
13
|
-
import { findReplaceStyles } from '@atlaskit/editor-
|
|
14
|
-
import { textHighlightStyle } from '@atlaskit/editor-
|
|
15
|
-
import { placeholderTextStyles } from '@atlaskit/editor-
|
|
16
|
-
import { tableStyles } from '@atlaskit/editor-
|
|
12
|
+
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
13
|
+
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
14
|
+
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
15
|
+
import { placeholderTextStyles } from '@atlaskit/editor-plugins/placeholder-text/styles';
|
|
16
|
+
import { tableStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
17
17
|
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorLineHeight, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
18
18
|
import { N200, N30A, N500 } from '@atlaskit/theme/colors';
|
|
19
19
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import { TableCssClassName } from '@atlaskit/editor-
|
|
4
|
-
import { tableMarginFullWidthMode } from '@atlaskit/editor-
|
|
3
|
+
import { TableCssClassName } from '@atlaskit/editor-plugins/table/types';
|
|
4
|
+
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
5
5
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
7
7
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
@@ -86,14 +86,13 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
_defineProperty(this, "openJiraIssueCollector", async () => {
|
|
89
|
-
var _this$props$api, _this$props$api$
|
|
89
|
+
var _this$props$api, _this$props$api$conte, _this$props$api$conte2, _this$props$api$conte3, _window$localStorage$, _this$props$api2, _this$props$api2$feed;
|
|
90
90
|
this.setState({
|
|
91
91
|
jiraIssueCollectorScriptLoading: true,
|
|
92
92
|
showOptOutOption: false
|
|
93
93
|
});
|
|
94
|
-
const
|
|
94
|
+
const contentId = (_this$props$api = this.props.api) === null || _this$props$api === void 0 ? void 0 : (_this$props$api$conte = _this$props$api.contextIdentifier) === null || _this$props$api$conte === void 0 ? void 0 : (_this$props$api$conte2 = _this$props$api$conte.sharedState.currentState()) === null || _this$props$api$conte2 === void 0 ? void 0 : (_this$props$api$conte3 = _this$props$api$conte2.contextIdentifierProvider) === null || _this$props$api$conte3 === void 0 ? void 0 : _this$props$api$conte3.objectId;
|
|
95
95
|
const sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
96
|
-
const contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
97
96
|
const tabId = window.sessionStorage['awc.tab.id'];
|
|
98
97
|
await ((_this$props$api2 = this.props.api) === null || _this$props$api2 === void 0 ? void 0 : (_this$props$api2$feed = _this$props$api2.feedbackDialog) === null || _this$props$api2$feed === void 0 ? void 0 : _this$props$api2$feed.actions.openFeedbackDialog({
|
|
99
98
|
...this.getFeedbackInfo(),
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-
|
|
6
|
+
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugins/help-dialog';
|
|
7
7
|
import { createDispatch } from '../../event-dispatcher';
|
|
8
8
|
export default class WithHelpTrigger extends React.Component {
|
|
9
9
|
constructor(...args) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "191.
|
|
2
|
+
export const version = "191.7.0";
|
|
@@ -16,6 +16,7 @@ import { ContextAdapter } from '../nodeviews/context-adapter';
|
|
|
16
16
|
import { useSetPresetContext } from '../presets/context';
|
|
17
17
|
import EditorContext from '../ui/EditorContext';
|
|
18
18
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
19
|
+
import { useProviders } from './hooks/useProviders';
|
|
19
20
|
import { getBaseFontSize } from './utils/getBaseFontSize';
|
|
20
21
|
/**
|
|
21
22
|
* EditorInternalComponent is used to capture the common component
|
|
@@ -155,6 +156,9 @@ function ReactEditorViewContextWrapper(props) {
|
|
|
155
156
|
setInternalEditorAPI === null || setInternalEditorAPI === void 0 || setInternalEditorAPI(api);
|
|
156
157
|
setExternalEditorAPI === null || setExternalEditorAPI === void 0 || setExternalEditorAPI(api);
|
|
157
158
|
}, [setInternalEditorAPI, setExternalEditorAPI]);
|
|
159
|
+
useProviders({
|
|
160
|
+
contextIdentifierProvider: props.editorProps.contextIdentifierProvider
|
|
161
|
+
});
|
|
158
162
|
return jsx(ReactEditorView, _extends({}, props, {
|
|
159
163
|
setEditorApi: setEditorAPI
|
|
160
164
|
}));
|
|
@@ -10,7 +10,7 @@ import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
|
10
10
|
import { useConstructor } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import { EditorExperience, ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
12
12
|
import { getAnalyticsAppearance, startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
13
|
-
import { basePlugin } from '@atlaskit/editor-
|
|
13
|
+
import { basePlugin } from '@atlaskit/editor-plugins/base';
|
|
14
14
|
import EditorActions from '../actions';
|
|
15
15
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
16
16
|
import { useEditorContext } from '../ui/EditorContext';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { usePresetContext } from '../../presets/context';
|
|
5
|
+
/**
|
|
6
|
+
* This hook is used to replace the old approach of using the `providerFactory`.
|
|
7
|
+
*
|
|
8
|
+
* Because plugins can't update their initial configuration, this hook listens to changes
|
|
9
|
+
* and calls a command to push the update to the plugins shared state.
|
|
10
|
+
*
|
|
11
|
+
* In the future ideally consumers implement this behaviour themselves.
|
|
12
|
+
*/
|
|
13
|
+
export var useProviders = function useProviders(_ref) {
|
|
14
|
+
var contextIdentifierProvider = _ref.contextIdentifierProvider;
|
|
15
|
+
var editorApi = usePresetContext();
|
|
16
|
+
useEffect(function () {
|
|
17
|
+
function setProvider() {
|
|
18
|
+
return _setProvider.apply(this, arguments);
|
|
19
|
+
}
|
|
20
|
+
function _setProvider() {
|
|
21
|
+
_setProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
22
|
+
var _editorApi$core, _editorApi$contextIde;
|
|
23
|
+
var provider;
|
|
24
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
25
|
+
while (1) switch (_context.prev = _context.next) {
|
|
26
|
+
case 0:
|
|
27
|
+
if (contextIdentifierProvider) {
|
|
28
|
+
_context.next = 2;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
return _context.abrupt("return");
|
|
32
|
+
case 2:
|
|
33
|
+
_context.next = 4;
|
|
34
|
+
return contextIdentifierProvider;
|
|
35
|
+
case 4:
|
|
36
|
+
provider = _context.sent;
|
|
37
|
+
editorApi === null || editorApi === void 0 || (_editorApi$core = editorApi.core) === null || _editorApi$core === void 0 || _editorApi$core.actions.execute(editorApi === null || editorApi === void 0 || (_editorApi$contextIde = editorApi.contextIdentifier) === null || _editorApi$contextIde === void 0 ? void 0 : _editorApi$contextIde.commands.setProvider({
|
|
38
|
+
contextIdentifierProvider: provider
|
|
39
|
+
}));
|
|
40
|
+
case 6:
|
|
41
|
+
case "end":
|
|
42
|
+
return _context.stop();
|
|
43
|
+
}
|
|
44
|
+
}, _callee);
|
|
45
|
+
}));
|
|
46
|
+
return _setProvider.apply(this, arguments);
|
|
47
|
+
}
|
|
48
|
+
setProvider();
|
|
49
|
+
}, [contextIdentifierProvider, editorApi]);
|
|
50
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -23,7 +23,7 @@ export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
|
|
|
23
23
|
* @deprecated
|
|
24
24
|
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
25
25
|
* This is here while we work to extract the annotation plugin.
|
|
26
|
-
* Please use the export from `@atlaskit/editor-
|
|
26
|
+
* Please use the export from `@atlaskit/editor-plugins/annotation`.
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
// Used in mobile bridge
|
|
@@ -47,5 +47,5 @@ export { PortalProvider, PortalProviderAPI, PortalRenderer } from '@atlaskit/edi
|
|
|
47
47
|
* @deprecated
|
|
48
48
|
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
49
49
|
* This is here while we work to extract the media plugin.
|
|
50
|
-
* Please use the export from `@atlaskit/editor-
|
|
50
|
+
* Please use the export from `@atlaskit/editor-plugins/media/types`.
|
|
51
51
|
*/
|
package/dist/esm/labs-next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from '
|
|
1
|
+
export { createDefaultPreset } from '../src/presets/default';
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
// #region Imports
|
|
2
2
|
|
|
3
3
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
4
|
-
import { analyticsPlugin } from '@atlaskit/editor-
|
|
5
|
-
import { annotationPlugin } from '@atlaskit/editor-
|
|
6
|
-
import { basePlugin } from '@atlaskit/editor-
|
|
7
|
-
import { betterTypeHistoryPlugin } from '@atlaskit/editor-
|
|
8
|
-
import { blockTypePlugin } from '@atlaskit/editor-
|
|
9
|
-
import { clearMarksOnEmptyDocPlugin } from '@atlaskit/editor-
|
|
10
|
-
import { clipboardPlugin } from '@atlaskit/editor-
|
|
11
|
-
import { codeBlockPlugin } from '@atlaskit/editor-
|
|
12
|
-
import { compositionPlugin } from '@atlaskit/editor-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
4
|
+
import { analyticsPlugin } from '@atlaskit/editor-plugins/analytics';
|
|
5
|
+
import { annotationPlugin } from '@atlaskit/editor-plugins/annotation';
|
|
6
|
+
import { basePlugin } from '@atlaskit/editor-plugins/base';
|
|
7
|
+
import { betterTypeHistoryPlugin } from '@atlaskit/editor-plugins/better-type-history';
|
|
8
|
+
import { blockTypePlugin } from '@atlaskit/editor-plugins/block-type';
|
|
9
|
+
import { clearMarksOnEmptyDocPlugin } from '@atlaskit/editor-plugins/clear-marks-on-empty-doc';
|
|
10
|
+
import { clipboardPlugin } from '@atlaskit/editor-plugins/clipboard';
|
|
11
|
+
import { codeBlockPlugin } from '@atlaskit/editor-plugins/code-block';
|
|
12
|
+
import { compositionPlugin } from '@atlaskit/editor-plugins/composition';
|
|
13
|
+
import { contextIdentifierPlugin } from '@atlaskit/editor-plugins/context-identifier';
|
|
14
|
+
import { copyButtonPlugin } from '@atlaskit/editor-plugins/copy-button';
|
|
15
|
+
import { decorationsPlugin } from '@atlaskit/editor-plugins/decorations';
|
|
16
|
+
import { editorDisabledPlugin } from '@atlaskit/editor-plugins/editor-disabled';
|
|
17
|
+
import { featureFlagsPlugin } from '@atlaskit/editor-plugins/feature-flags';
|
|
18
|
+
import { floatingToolbarPlugin } from '@atlaskit/editor-plugins/floating-toolbar';
|
|
19
|
+
import { focusPlugin } from '@atlaskit/editor-plugins/focus';
|
|
20
|
+
import { historyPlugin } from '@atlaskit/editor-plugins/history';
|
|
21
|
+
import { hyperlinkPlugin } from '@atlaskit/editor-plugins/hyperlink';
|
|
22
|
+
import { pastePlugin } from '@atlaskit/editor-plugins/paste';
|
|
23
|
+
import { placeholderPlugin } from '@atlaskit/editor-plugins/placeholder';
|
|
24
|
+
import { quickInsertPlugin } from '@atlaskit/editor-plugins/quick-insert';
|
|
25
|
+
import { selectionPlugin } from '@atlaskit/editor-plugins/selection';
|
|
26
|
+
import { selectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
|
|
27
|
+
import { submitEditorPlugin } from '@atlaskit/editor-plugins/submit-editor';
|
|
28
|
+
import { textFormattingPlugin } from '@atlaskit/editor-plugins/text-formatting';
|
|
29
|
+
import { typeAheadPlugin } from '@atlaskit/editor-plugins/type-ahead';
|
|
30
|
+
import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
|
|
31
|
+
import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
|
|
32
|
+
import { widthPlugin } from '@atlaskit/editor-plugins/width';
|
|
32
33
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
33
34
|
|
|
34
35
|
// #endregion
|
|
@@ -43,7 +44,9 @@ export function createDefaultPreset(options) {
|
|
|
43
44
|
var preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).maybeAdd([analyticsPlugin, {
|
|
44
45
|
createAnalyticsEvent: options.createAnalyticsEvent,
|
|
45
46
|
performanceTracking: options.performanceTracking
|
|
46
|
-
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, options.paste]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([
|
|
47
|
+
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, options.paste]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
48
|
+
contextIdentifierProvider: options.contextIdentifierProvider
|
|
49
|
+
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead || {
|
|
47
50
|
createAnalyticsEvent: options.createAnalyticsEvent
|
|
48
51
|
}]).maybeAdd(historyPlugin, Boolean(isMobile || options.allowUndoRedoButtons)).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = options.featureFlags) === null || _options$featureFlags === void 0 ? void 0 : _options$featureFlags.undoRedoButtons)).add([blockTypePlugin, options.blockType]).add(clearMarksOnEmptyDocPlugin).maybeAdd([annotationPlugin, options.annotationProviders], Boolean(options.annotationProviders)).maybeAdd([selectionToolbarPlugin, {
|
|
49
52
|
preferenceToolbarAboveSelection: false
|
|
@@ -3,50 +3,50 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import { alignmentPlugin } from '@atlaskit/editor-
|
|
7
|
-
import { annotationPlugin } from '@atlaskit/editor-
|
|
8
|
-
import { avatarGroupPlugin } from '@atlaskit/editor-
|
|
9
|
-
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-
|
|
10
|
-
import { borderPlugin } from '@atlaskit/editor-
|
|
11
|
-
import { breakoutPlugin } from '@atlaskit/editor-
|
|
12
|
-
import { captionPlugin } from '@atlaskit/editor-
|
|
13
|
-
import { cardPlugin } from '@atlaskit/editor-
|
|
14
|
-
import { codeBidiWarningPlugin } from '@atlaskit/editor-
|
|
15
|
-
import { collabEditPlugin } from '@atlaskit/editor-
|
|
16
|
-
import { contentInsertionPlugin } from '@atlaskit/editor-
|
|
17
|
-
import { contextPanelPlugin } from '@atlaskit/editor-
|
|
18
|
-
import { customAutoformatPlugin } from '@atlaskit/editor-
|
|
19
|
-
import { dataConsumerPlugin } from '@atlaskit/editor-
|
|
20
|
-
import { datePlugin } from '@atlaskit/editor-
|
|
21
|
-
import { emojiPlugin } from '@atlaskit/editor-
|
|
22
|
-
import { expandPlugin } from '@atlaskit/editor-
|
|
23
|
-
import { extensionPlugin } from '@atlaskit/editor-
|
|
24
|
-
import { feedbackDialogPlugin } from '@atlaskit/editor-
|
|
25
|
-
import { findReplacePlugin } from '@atlaskit/editor-
|
|
26
|
-
import { fragmentPlugin } from '@atlaskit/editor-
|
|
27
|
-
import { gridPlugin } from '@atlaskit/editor-
|
|
28
|
-
import { guidelinePlugin } from '@atlaskit/editor-
|
|
29
|
-
import { helpDialogPlugin } from '@atlaskit/editor-
|
|
30
|
-
import { imageUploadPlugin } from '@atlaskit/editor-
|
|
31
|
-
import { indentationPlugin } from '@atlaskit/editor-
|
|
32
|
-
import { insertBlockPlugin } from '@atlaskit/editor-
|
|
33
|
-
import { layoutPlugin } from '@atlaskit/editor-
|
|
34
|
-
import { listPlugin } from '@atlaskit/editor-
|
|
35
|
-
import { loomPlugin } from '@atlaskit/editor-
|
|
36
|
-
import { maxContentSizePlugin } from '@atlaskit/editor-
|
|
37
|
-
import { mediaPlugin } from '@atlaskit/editor-
|
|
38
|
-
import { mentionsPlugin } from '@atlaskit/editor-
|
|
39
|
-
import { panelPlugin } from '@atlaskit/editor-
|
|
40
|
-
import { pasteOptionsToolbarPlugin } from '@atlaskit/editor-
|
|
41
|
-
import { placeholderTextPlugin } from '@atlaskit/editor-
|
|
42
|
-
import { rulePlugin } from '@atlaskit/editor-
|
|
43
|
-
import { saveOnEnterPlugin } from '@atlaskit/editor-
|
|
44
|
-
import { scrollIntoViewPlugin } from '@atlaskit/editor-
|
|
45
|
-
import { statusPlugin } from '@atlaskit/editor-
|
|
46
|
-
import { tablesPlugin } from '@atlaskit/editor-
|
|
47
|
-
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-
|
|
48
|
-
import { textColorPlugin } from '@atlaskit/editor-
|
|
49
|
-
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-
|
|
6
|
+
import { alignmentPlugin } from '@atlaskit/editor-plugins/alignment';
|
|
7
|
+
import { annotationPlugin } from '@atlaskit/editor-plugins/annotation';
|
|
8
|
+
import { avatarGroupPlugin } from '@atlaskit/editor-plugins/avatar-group';
|
|
9
|
+
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugins/before-primary-toolbar';
|
|
10
|
+
import { borderPlugin } from '@atlaskit/editor-plugins/border';
|
|
11
|
+
import { breakoutPlugin } from '@atlaskit/editor-plugins/breakout';
|
|
12
|
+
import { captionPlugin } from '@atlaskit/editor-plugins/caption';
|
|
13
|
+
import { cardPlugin } from '@atlaskit/editor-plugins/card';
|
|
14
|
+
import { codeBidiWarningPlugin } from '@atlaskit/editor-plugins/code-bidi-warning';
|
|
15
|
+
import { collabEditPlugin } from '@atlaskit/editor-plugins/collab-edit';
|
|
16
|
+
import { contentInsertionPlugin } from '@atlaskit/editor-plugins/content-insertion';
|
|
17
|
+
import { contextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
|
|
18
|
+
import { customAutoformatPlugin } from '@atlaskit/editor-plugins/custom-autoformat';
|
|
19
|
+
import { dataConsumerPlugin } from '@atlaskit/editor-plugins/data-consumer';
|
|
20
|
+
import { datePlugin } from '@atlaskit/editor-plugins/date';
|
|
21
|
+
import { emojiPlugin } from '@atlaskit/editor-plugins/emoji';
|
|
22
|
+
import { expandPlugin } from '@atlaskit/editor-plugins/expand';
|
|
23
|
+
import { extensionPlugin } from '@atlaskit/editor-plugins/extension';
|
|
24
|
+
import { feedbackDialogPlugin } from '@atlaskit/editor-plugins/feedback-dialog';
|
|
25
|
+
import { findReplacePlugin } from '@atlaskit/editor-plugins/find-replace';
|
|
26
|
+
import { fragmentPlugin } from '@atlaskit/editor-plugins/fragment';
|
|
27
|
+
import { gridPlugin } from '@atlaskit/editor-plugins/grid';
|
|
28
|
+
import { guidelinePlugin } from '@atlaskit/editor-plugins/guideline';
|
|
29
|
+
import { helpDialogPlugin } from '@atlaskit/editor-plugins/help-dialog';
|
|
30
|
+
import { imageUploadPlugin } from '@atlaskit/editor-plugins/image-upload';
|
|
31
|
+
import { indentationPlugin } from '@atlaskit/editor-plugins/indentation';
|
|
32
|
+
import { insertBlockPlugin } from '@atlaskit/editor-plugins/insert-block';
|
|
33
|
+
import { layoutPlugin } from '@atlaskit/editor-plugins/layout';
|
|
34
|
+
import { listPlugin } from '@atlaskit/editor-plugins/list';
|
|
35
|
+
import { loomPlugin } from '@atlaskit/editor-plugins/loom';
|
|
36
|
+
import { maxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
37
|
+
import { mediaPlugin } from '@atlaskit/editor-plugins/media';
|
|
38
|
+
import { mentionsPlugin } from '@atlaskit/editor-plugins/mentions';
|
|
39
|
+
import { panelPlugin } from '@atlaskit/editor-plugins/panel';
|
|
40
|
+
import { pasteOptionsToolbarPlugin } from '@atlaskit/editor-plugins/paste-options-toolbar';
|
|
41
|
+
import { placeholderTextPlugin } from '@atlaskit/editor-plugins/placeholder-text';
|
|
42
|
+
import { rulePlugin } from '@atlaskit/editor-plugins/rule';
|
|
43
|
+
import { saveOnEnterPlugin } from '@atlaskit/editor-plugins/save-on-enter';
|
|
44
|
+
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugins/scroll-into-view';
|
|
45
|
+
import { statusPlugin } from '@atlaskit/editor-plugins/status';
|
|
46
|
+
import { tablesPlugin } from '@atlaskit/editor-plugins/table';
|
|
47
|
+
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugins/tasks-and-decisions';
|
|
48
|
+
import { textColorPlugin } from '@atlaskit/editor-plugins/text-color';
|
|
49
|
+
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugins/toolbar-lists-indentation';
|
|
50
50
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
51
51
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
52
52
|
import { version as coreVersion } from '../version-wrapper';
|
|
@@ -116,7 +116,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
116
116
|
}], Boolean(props.mentionProvider)).maybeAdd(emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([tablesPlugin, {
|
|
117
117
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
118
118
|
tableResizingEnabled: getBooleanFF('platform.editor.custom-table-width') && ['full-page', 'full-width'].includes(appearance || ''),
|
|
119
|
-
dragAndDropEnabled:
|
|
119
|
+
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && isFullPage,
|
|
120
120
|
breakoutEnabled: appearance === 'full-page',
|
|
121
121
|
allowContextualMenu: !isMobile,
|
|
122
122
|
fullWidthEnabled: appearance === 'full-width',
|
package/dist/esm/test-utils.js
CHANGED
|
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
6
|
-
import { basePlugin } from '@atlaskit/editor-
|
|
6
|
+
import { basePlugin } from '@atlaskit/editor-plugins/base';
|
|
7
7
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { createSchema } from './create-editor/create-schema';
|
|
9
9
|
import { sortByOrder } from './create-editor/sort-by-order';
|
|
@@ -20,7 +20,7 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
20
20
|
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
21
21
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
22
22
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
23
|
-
import { tableCommentEditorStyles } from '@atlaskit/editor-
|
|
23
|
+
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
24
24
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
25
25
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
26
26
|
import { N40 } from '@atlaskit/theme/colors';
|
|
@@ -8,7 +8,7 @@ var beforePrimaryToolbarPluginWrapperStyles = css({
|
|
|
8
8
|
justifyContent: 'flex-end',
|
|
9
9
|
alignItems: 'center'
|
|
10
10
|
});
|
|
11
|
-
// Duplicate of the wrapper from `editor-
|
|
11
|
+
// Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
|
|
12
12
|
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
13
13
|
export var BeforePrimaryToolbarWrapper = function BeforePrimaryToolbarWrapper(props) {
|
|
14
14
|
return jsx("div", {
|
|
@@ -2,8 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
5
|
-
import { tableFullPageEditorStyles } from '@atlaskit/editor-
|
|
6
|
-
import { tableMarginFullWidthMode } from '@atlaskit/editor-
|
|
5
|
+
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
6
|
+
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
7
7
|
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorSwoopCubicBezier, akLayoutGutterOffset, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
9
9
|
import { scrollbarStyles } from '../../styles';
|
|
@@ -5,10 +5,10 @@ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
5
5
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import { N40A, N50A,
|
|
8
|
+
import { N100A, N40A, N50A, R300, R50 } from '@atlaskit/theme/colors';
|
|
9
9
|
var EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
10
10
|
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR() {
|
|
11
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-icon-subtle, ".concat(
|
|
11
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-icon-subtle, ".concat(N100A, ")"));
|
|
12
12
|
};
|
|
13
13
|
var DANGER_STATE_BACKGROUND_COLOR = "var(--ds-background-danger, ".concat(R50, ")");
|
|
14
14
|
var DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, ".concat(R300, ")");
|
|
@@ -11,11 +11,11 @@ import { annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFi
|
|
|
11
11
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { codeMarkSharedStyles, linkSharedStyle, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
13
13
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import { blocktypeStyles } from '@atlaskit/editor-
|
|
15
|
-
import { findReplaceStyles } from '@atlaskit/editor-
|
|
16
|
-
import { textHighlightStyle } from '@atlaskit/editor-
|
|
17
|
-
import { placeholderTextStyles } from '@atlaskit/editor-
|
|
18
|
-
import { tableStyles } from '@atlaskit/editor-
|
|
14
|
+
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
15
|
+
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
16
|
+
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
17
|
+
import { placeholderTextStyles } from '@atlaskit/editor-plugins/placeholder-text/styles';
|
|
18
|
+
import { tableStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
19
19
|
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorLineHeight, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
20
20
|
import { N200, N30A, N500 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|