@atlaskit/editor-core 234.3.2 → 235.0.1
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 +17 -0
- package/dist/cjs/composable-editor/editor-internal-compiled.js +0 -6
- package/dist/cjs/composable-editor/editor-internal.js +3 -12
- package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +1 -7
- package/dist/cjs/ui/Appearance/ChromelessEditorContainer.js +26 -13
- package/dist/cjs/ui/Appearance/Comment/Comment.js +262 -7
- package/dist/cjs/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -13
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +15 -7
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +41 -10
- package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +192 -14
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper.js +23 -7
- package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
- package/dist/cjs/ui/ChromeCollapsed/index.js +1 -7
- package/dist/cjs/ui/ContextPanel/index-compiled.js +0 -6
- package/dist/cjs/ui/ContextPanel/index.js +2 -11
- package/dist/cjs/ui/PluginSlot/PluginSlot-compiled.js +0 -7
- package/dist/cjs/ui/PluginSlot/index.js +1 -6
- package/dist/cjs/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +1 -8
- package/dist/cjs/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +2 -11
- package/dist/cjs/ui/WithFlash/index.js +1 -6
- package/dist/cjs/ui/WithFlash/withFlash-compiled.js +1 -6
- package/dist/cjs/ui/quick-insert/getExtensionQuickInsertComponents.js +7 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal-compiled.js +0 -6
- package/dist/es2019/composable-editor/editor-internal.js +3 -10
- package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +1 -5
- package/dist/es2019/ui/Appearance/ChromelessEditorContainer.js +24 -12
- package/dist/es2019/ui/Appearance/Comment/Comment.js +254 -5
- package/dist/es2019/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -8
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +11 -5
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +37 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -4
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +186 -11
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper.js +24 -5
- package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
- package/dist/es2019/ui/ChromeCollapsed/index.js +1 -5
- package/dist/es2019/ui/ContextPanel/index-compiled.js +0 -6
- package/dist/es2019/ui/ContextPanel/index.js +2 -7
- package/dist/es2019/ui/PluginSlot/PluginSlot-compiled.js +0 -7
- package/dist/es2019/ui/PluginSlot/index.js +1 -4
- package/dist/es2019/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +1 -5
- package/dist/es2019/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +2 -9
- package/dist/es2019/ui/WithFlash/index.js +1 -4
- package/dist/es2019/ui/WithFlash/withFlash-compiled.js +0 -6
- package/dist/es2019/ui/quick-insert/getExtensionQuickInsertComponents.js +6 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal-compiled.js +0 -6
- package/dist/esm/composable-editor/editor-internal.js +3 -12
- package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +1 -7
- package/dist/esm/ui/Appearance/ChromelessEditorContainer.js +25 -14
- package/dist/esm/ui/Appearance/Comment/Comment.js +260 -7
- package/dist/esm/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
- package/dist/esm/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -12
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +13 -7
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +39 -10
- package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -6
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +190 -13
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
- package/dist/esm/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper.js +23 -7
- package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
- package/dist/esm/ui/ChromeCollapsed/index.js +1 -7
- package/dist/esm/ui/ContextPanel/index-compiled.js +0 -6
- package/dist/esm/ui/ContextPanel/index.js +2 -11
- package/dist/esm/ui/PluginSlot/PluginSlot-compiled.js +0 -7
- package/dist/esm/ui/PluginSlot/index.js +1 -6
- package/dist/esm/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
- package/dist/esm/ui/Toolbar/ToolbarInner.js +1 -7
- package/dist/esm/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +2 -11
- package/dist/esm/ui/WithFlash/index.js +1 -6
- package/dist/esm/ui/WithFlash/withFlash-compiled.js +0 -6
- package/dist/esm/ui/quick-insert/getExtensionQuickInsertComponents.js +8 -5
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/editor-internal-compiled.d.ts +0 -6
- package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.d.ts +0 -4
- package/dist/types/ui/Appearance/ChromelessEditorContainer.d.ts +10 -7
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +24 -2
- package/dist/types/ui/Appearance/Comment/FixedToolbar-compiled.d.ts +0 -6
- package/dist/types/ui/Appearance/Comment/StickyToolbar-compiled.d.ts +0 -6
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +7 -3
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +2 -3
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +54 -6
- package/dist/types/ui/Appearance/FullPage/MainToolbar-compiled.d.ts +0 -6
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +13 -3
- package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-compiled.d.ts +0 -6
- package/dist/types/ui/PluginSlot/PluginSlot-compiled.d.ts +0 -6
- package/dist/types/ui/Toolbar/ToolbarComponentsWrapper-compiled.d.ts +0 -6
- package/dist/types/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.d.ts +0 -6
- package/dist/types/ui/WithFlash/index.d.ts +1 -1
- package/dist/types/ui/WithFlash/withFlash-compiled.d.ts +0 -6
- package/package.json +44 -44
- package/dist/cjs/composable-editor/BaseThemeWrapper.js +0 -47
- package/dist/cjs/composable-editor/editor-internal-emotion.js +0 -35
- package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -36
- package/dist/cjs/ui/Appearance/Chromeless-compiled.js +0 -38
- package/dist/cjs/ui/Appearance/Chromeless-emotion.js +0 -89
- package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +0 -273
- package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +0 -339
- package/dist/cjs/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -89
- package/dist/cjs/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -126
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -29
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -34
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -57
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -89
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -13
- package/dist/cjs/ui/Appearance/FullPage/FullPage-emotion.js +0 -38
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -201
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -398
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -63
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -13
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -35
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -70
- package/dist/cjs/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -13
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +0 -65
- package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -37
- package/dist/cjs/ui/ContextPanel/index-emotion.js +0 -86
- package/dist/cjs/ui/PluginSlot/PluginSlot-emotion.js +0 -35
- package/dist/cjs/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -36
- package/dist/cjs/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -32
- package/dist/cjs/ui/WithFlash/withFlash-emotion.js +0 -91
- package/dist/es2019/composable-editor/BaseThemeWrapper.js +0 -35
- package/dist/es2019/composable-editor/editor-internal-emotion.js +0 -27
- package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -26
- package/dist/es2019/ui/Appearance/Chromeless-compiled.js +0 -30
- package/dist/es2019/ui/Appearance/Chromeless-emotion.js +0 -80
- package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +0 -260
- package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +0 -326
- package/dist/es2019/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -86
- package/dist/es2019/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -123
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -19
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -25
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -47
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -79
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPage-emotion.js +0 -29
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -190
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -390
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -53
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -5
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -30
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -65
- package/dist/es2019/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -5
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +0 -59
- package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -27
- package/dist/es2019/ui/ContextPanel/index-emotion.js +0 -74
- package/dist/es2019/ui/PluginSlot/PluginSlot-emotion.js +0 -25
- package/dist/es2019/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -28
- package/dist/es2019/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -24
- package/dist/es2019/ui/WithFlash/withFlash-emotion.js +0 -75
- package/dist/esm/composable-editor/BaseThemeWrapper.js +0 -39
- package/dist/esm/composable-editor/editor-internal-emotion.js +0 -28
- package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -30
- package/dist/esm/ui/Appearance/Chromeless-compiled.js +0 -31
- package/dist/esm/ui/Appearance/Chromeless-emotion.js +0 -83
- package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +0 -266
- package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +0 -328
- package/dist/esm/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -81
- package/dist/esm/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -119
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -21
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -27
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -49
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -81
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -7
- package/dist/esm/ui/Appearance/FullPage/FullPage-emotion.js +0 -31
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -194
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -388
- package/dist/esm/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -55
- package/dist/esm/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -7
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -29
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -62
- package/dist/esm/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -7
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +0 -59
- package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -29
- package/dist/esm/ui/ContextPanel/index-emotion.js +0 -79
- package/dist/esm/ui/PluginSlot/PluginSlot-emotion.js +0 -29
- package/dist/esm/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -28
- package/dist/esm/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -25
- package/dist/esm/ui/WithFlash/withFlash-emotion.js +0 -88
- package/dist/types/composable-editor/BaseThemeWrapper.d.ts +0 -7
- package/dist/types/composable-editor/editor-internal-emotion.d.ts +0 -15
- package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.d.ts +0 -12
- package/dist/types/ui/Appearance/Chromeless-compiled.d.ts +0 -18
- package/dist/types/ui/Appearance/Chromeless-emotion.d.ts +0 -18
- package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +0 -30
- package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +0 -20
- package/dist/types/ui/Appearance/Comment/FixedToolbar-emotion.d.ts +0 -19
- package/dist/types/ui/Appearance/Comment/StickyToolbar-emotion.d.ts +0 -21
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +0 -16
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +0 -16
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +0 -3
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +0 -14
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/FullPage-emotion.d.ts +0 -7
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +0 -57
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +0 -57
- package/dist/types/ui/Appearance/FullPage/MainToolbar-emotion.d.ts +0 -21
- package/dist/types/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-compiled.d.ts +0 -19
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-emotion.d.ts +0 -19
- package/dist/types/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +0 -19
- package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-emotion.d.ts +0 -13
- package/dist/types/ui/ContextPanel/index-emotion.d.ts +0 -13
- package/dist/types/ui/PluginSlot/PluginSlot-emotion.d.ts +0 -12
- package/dist/types/ui/Toolbar/ToolbarComponentsWrapper-emotion.d.ts +0 -17
- package/dist/types/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.d.ts +0 -17
- package/dist/types/ui/WithFlash/withFlash-emotion.d.ts +0 -19
- /package/dist/cjs/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.CommentEditorWithIntlEmotion = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _reactIntl = require("react-intl");
|
|
15
|
-
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
16
|
-
var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
|
|
17
|
-
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
18
|
-
var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
|
|
19
|
-
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
|
-
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
21
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
24
|
-
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
25
|
-
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
26
|
-
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
|
|
27
|
-
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
28
|
-
var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
|
|
29
|
-
var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
|
|
30
|
-
var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
|
|
31
|
-
var _CommentToolbar = require("./CommentToolbar");
|
|
32
|
-
var _Toolbar = require("./Toolbar");
|
|
33
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
34
|
-
/**
|
|
35
|
-
* @jsxRuntime classic
|
|
36
|
-
* @jsx jsx
|
|
37
|
-
*/
|
|
38
|
-
/**
|
|
39
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
40
|
-
* Used via `componentWithCondition` in `Comment.tsx`.
|
|
41
|
-
*
|
|
42
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
46
|
-
|
|
47
|
-
// Ignored via go/ees005
|
|
48
|
-
// eslint-disable-next-line import/no-named-as-default
|
|
49
|
-
|
|
50
|
-
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
51
|
-
var commentEditorStyles = (0, _react2.css)({
|
|
52
|
-
display: 'flex',
|
|
53
|
-
flexDirection: 'column',
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
55
|
-
'.less-margin > .ProseMirror': {
|
|
56
|
-
margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
|
|
57
|
-
},
|
|
58
|
-
minWidth: '272px',
|
|
59
|
-
height: 'auto',
|
|
60
|
-
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
61
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8C8F97)"),
|
|
62
|
-
boxSizing: 'border-box',
|
|
63
|
-
borderRadius: "var(--ds-radius-medium, 6px)",
|
|
64
|
-
maxWidth: 'inherit',
|
|
65
|
-
wordWrap: 'break-word'
|
|
66
|
-
});
|
|
67
|
-
var modernisedEditorStyles = (0, _react2.css)({
|
|
68
|
-
borderRadius: "var(--ds-radius-xlarge, 12px)",
|
|
69
|
-
borderColor: "var(--ds-border-input, #8C8F97)"
|
|
70
|
-
});
|
|
71
|
-
var secondaryToolbarStyles = (0, _react2.css)({
|
|
72
|
-
boxSizing: 'border-box',
|
|
73
|
-
justifyContent: 'flex-end',
|
|
74
|
-
alignItems: 'center',
|
|
75
|
-
display: 'flex',
|
|
76
|
-
padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
77
|
-
});
|
|
78
|
-
var mainToolbarCustomComponentsSlotStyleNew = (0, _react2.css)({
|
|
79
|
-
display: 'flex',
|
|
80
|
-
justifyContent: 'flex-end',
|
|
81
|
-
alignItems: 'center',
|
|
82
|
-
flexGrow: 1,
|
|
83
|
-
paddingRight: "var(--ds-space-250, 20px)",
|
|
84
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
85
|
-
'> div': {
|
|
86
|
-
display: 'flex',
|
|
87
|
-
flexShrink: 0
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
var mainToolbarCustomComponentsSlotStylePaddingOverride = (0, _react2.css)({
|
|
91
|
-
paddingRight: 0
|
|
92
|
-
});
|
|
93
|
-
var mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
94
|
-
paddingRight: 0
|
|
95
|
-
}));
|
|
96
|
-
var appearance = 'comment';
|
|
97
|
-
var CommentEditorWithIntlEmotion = exports.CommentEditorWithIntlEmotion = function CommentEditorWithIntlEmotion(props) {
|
|
98
|
-
var _editorAPI$blockMenu$, _editorAPI$blockMenu;
|
|
99
|
-
var editorAPI = props.editorAPI;
|
|
100
|
-
|
|
101
|
-
// Get useStandardNodeWidth from block menu plugin shared state
|
|
102
|
-
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
103
|
-
var useStandardNodeWidth = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.currentState()) === null || _editorAPI$blockMenu === void 0 ? void 0 : _editorAPI$blockMenu.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
|
|
104
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
|
|
105
|
-
var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
|
|
106
|
-
return {
|
|
107
|
-
maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
|
|
108
|
-
primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
|
|
109
|
-
editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
|
|
110
|
-
};
|
|
111
|
-
}),
|
|
112
|
-
editorViewMode = _useSharedPluginState.editorViewMode,
|
|
113
|
-
primaryToolbarComponentsState = _useSharedPluginState.primaryToolbarComponentsState,
|
|
114
|
-
maxContentSizeReached = _useSharedPluginState.maxContentSizeReached;
|
|
115
|
-
var primaryToolbarState = (0, _getPrimaryToolbarComponents.getPrimaryToolbarComponents)(editorAPI, primaryToolbarComponentsState);
|
|
116
|
-
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(editorAPI, ['media']),
|
|
117
|
-
mediaState = _useSharedPluginState2.mediaState;
|
|
118
|
-
var intl = (0, _reactIntl.useIntl)();
|
|
119
|
-
var editorDOMElement = props.editorDOMElement,
|
|
120
|
-
editorView = props.editorView,
|
|
121
|
-
editorActions = props.editorActions,
|
|
122
|
-
eventDispatcher = props.eventDispatcher,
|
|
123
|
-
providerFactory = props.providerFactory,
|
|
124
|
-
contentComponents = props.contentComponents,
|
|
125
|
-
customContentComponents = props.customContentComponents,
|
|
126
|
-
customPrimaryToolbarComponents = props.customPrimaryToolbarComponents,
|
|
127
|
-
primaryToolbarComponentsProp = props.primaryToolbarComponents,
|
|
128
|
-
customSecondaryToolbarComponents = props.customSecondaryToolbarComponents,
|
|
129
|
-
popupsMountPoint = props.popupsMountPoint,
|
|
130
|
-
popupsBoundariesElement = props.popupsBoundariesElement,
|
|
131
|
-
popupsScrollableElement = props.popupsScrollableElement,
|
|
132
|
-
maxHeight = props.maxHeight,
|
|
133
|
-
_props$minHeight = props.minHeight,
|
|
134
|
-
minHeight = _props$minHeight === void 0 ? 150 : _props$minHeight,
|
|
135
|
-
onSave = props.onSave,
|
|
136
|
-
onCancel = props.onCancel,
|
|
137
|
-
disabled = props.disabled,
|
|
138
|
-
dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
|
|
139
|
-
useStickyToolbar = props.useStickyToolbar,
|
|
140
|
-
pluginHooks = props.pluginHooks,
|
|
141
|
-
featureFlags = props.featureFlags,
|
|
142
|
-
innerRef = props.innerRef,
|
|
143
|
-
isEditorModernisationEnabled = props.isEditorModernisationEnabled;
|
|
144
|
-
var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
|
|
145
|
-
var containerElement = _react.default.useRef(null);
|
|
146
|
-
|
|
147
|
-
// Wrapper container for toolbar and content area
|
|
148
|
-
var wrapperElementRef = (0, _react.useMemo)(function () {
|
|
149
|
-
return innerRef || /*#__PURE__*/_react.default.createRef();
|
|
150
|
-
}, [innerRef]);
|
|
151
|
-
var _useState = (0, _react.useState)(false),
|
|
152
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
153
|
-
saveButtonDisabled = _useState2[0],
|
|
154
|
-
setSaveButtonDisabled = _useState2[1];
|
|
155
|
-
(0, _react.useEffect)(function () {
|
|
156
|
-
if (mediaState) {
|
|
157
|
-
mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
|
|
158
|
-
}
|
|
159
|
-
return function () {
|
|
160
|
-
return mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
|
|
161
|
-
};
|
|
162
|
-
}, [mediaState]);
|
|
163
|
-
var handleSave = (0, _react.useCallback)(function () {
|
|
164
|
-
if (editorView && onSave) {
|
|
165
|
-
onSave(editorView);
|
|
166
|
-
}
|
|
167
|
-
}, [editorView, onSave]);
|
|
168
|
-
var handleCancel = (0, _react.useCallback)(function () {
|
|
169
|
-
if (editorView && onCancel) {
|
|
170
|
-
onCancel(editorView);
|
|
171
|
-
}
|
|
172
|
-
}, [editorView, onCancel]);
|
|
173
|
-
var isShortcutToFocusToolbar = (0, _react.useCallback)(function (event) {
|
|
174
|
-
//Alt + F9 to reach first element in this main toolbar
|
|
175
|
-
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
176
|
-
}, []);
|
|
177
|
-
|
|
178
|
-
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
179
|
-
var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
|
|
180
|
-
var handleEscape = (0, _react.useCallback)(function (event) {
|
|
181
|
-
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
182
|
-
editorView === null || editorView === void 0 || editorView.focus();
|
|
183
|
-
}
|
|
184
|
-
event.preventDefault();
|
|
185
|
-
event.stopPropagation();
|
|
186
|
-
}, [editorView]);
|
|
187
|
-
var primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
188
|
-
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
189
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
190
|
-
}
|
|
191
|
-
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
192
|
-
var memoizedContentAreaStyles = (0, _react.useMemo)(function () {
|
|
193
|
-
return [maxHeight ?
|
|
194
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
195
|
-
(0, _react2.css)({
|
|
196
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
197
|
-
maxHeight: "".concat(maxHeight, "px"),
|
|
198
|
-
// When maxHeight is set, content area should have overflow-y explicitly set as auto
|
|
199
|
-
// As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
|
|
200
|
-
// This will cause the content area to have content overflowing the container
|
|
201
|
-
// so need to set overflow-y as auto to make sure the content area is scrollable
|
|
202
|
-
overflowY: 'auto'
|
|
203
|
-
}) : null];
|
|
204
|
-
}, [maxHeight]);
|
|
205
|
-
var contentAreaStyles = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? memoizedContentAreaStyles : [maxHeight ?
|
|
206
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
207
|
-
(0, _react2.css)({
|
|
208
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
209
|
-
maxHeight: "".concat(maxHeight, "px"),
|
|
210
|
-
// When maxHeight is set, content area should have overflow-y explicitly set as auto
|
|
211
|
-
// As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
|
|
212
|
-
// This will cause the content area to have content overflowing the container
|
|
213
|
-
// so need to set overflow-y as auto to make sure the content area is scrollable
|
|
214
|
-
overflowY: 'auto'
|
|
215
|
-
}) : null];
|
|
216
|
-
var customToolbarSlot = (0, _react2.jsx)("div", {
|
|
217
|
-
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
|
|
218
|
-
}, customPrimaryToolbarComponents);
|
|
219
|
-
return (0, _react2.jsx)(_WithFlash.default, {
|
|
220
|
-
animate: maxContentSizeReached
|
|
221
|
-
}, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
|
|
222
|
-
css: [commentEditorStyles, isEditorModernisationEnabled && modernisedEditorStyles,
|
|
223
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
224
|
-
(0, _react2.css)({
|
|
225
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
226
|
-
minHeight: "".concat(minHeight, "px")
|
|
227
|
-
})]
|
|
228
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
229
|
-
,
|
|
230
|
-
className: "akEditor",
|
|
231
|
-
ref: wrapperElementRef
|
|
232
|
-
}, (0, _react2.jsx)(_Toolbar.MainToolbar, {
|
|
233
|
-
isEditorModernisationEnabled: isEditorModernisationEnabled,
|
|
234
|
-
useStickyToolbar: useStickyToolbar,
|
|
235
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled,
|
|
236
|
-
isNewToolbarEnabled: isToolbarAIFCEnabled
|
|
237
|
-
}, isToolbarAIFCEnabled ? (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
238
|
-
editorView: editorView,
|
|
239
|
-
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
240
|
-
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
241
|
-
handleEscape: handleEscape,
|
|
242
|
-
editorAppearance: appearance,
|
|
243
|
-
useStickyToolbar: useStickyToolbar,
|
|
244
|
-
intl: intl
|
|
245
|
-
}, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
|
|
246
|
-
editorAPI: editorAPI,
|
|
247
|
-
editorView: editorView,
|
|
248
|
-
editorAppearance: appearance,
|
|
249
|
-
disabled: !!disabled,
|
|
250
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
251
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
252
|
-
popupsMountPoint: popupsMountPoint
|
|
253
|
-
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
254
|
-
editorView: editorView,
|
|
255
|
-
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
256
|
-
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
257
|
-
handleEscape: handleEscape,
|
|
258
|
-
editorAppearance: appearance,
|
|
259
|
-
useStickyToolbar: useStickyToolbar,
|
|
260
|
-
intl: intl
|
|
261
|
-
}, (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
|
|
262
|
-
// Ignored via go/ees005
|
|
263
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
264
|
-
, {
|
|
265
|
-
editorView: editorView,
|
|
266
|
-
editorActions: editorActions
|
|
267
|
-
// Ignored via go/ees005
|
|
268
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
269
|
-
,
|
|
270
|
-
eventDispatcher: eventDispatcher
|
|
271
|
-
// Ignored via go/ees005
|
|
272
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
273
|
-
,
|
|
274
|
-
providerFactory: providerFactory,
|
|
275
|
-
appearance: appearance,
|
|
276
|
-
items: primaryToolbarComponents,
|
|
277
|
-
popupsMountPoint: popupsMountPoint,
|
|
278
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
279
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
280
|
-
disabled: !!disabled,
|
|
281
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
282
|
-
containerElement: containerElement.current,
|
|
283
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
284
|
-
}), customToolbarSlot)), (0, _react2.jsx)(_ClickAreaBlock.default, {
|
|
285
|
-
editorView: editorView,
|
|
286
|
-
editorDisabled: disabled
|
|
287
|
-
}, (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref) {
|
|
288
|
-
var width = _ref.width;
|
|
289
|
-
return (0, _react2.jsx)(_EditorContentContainer.default, {
|
|
290
|
-
ref: containerElement,
|
|
291
|
-
css: contentAreaStyles,
|
|
292
|
-
isScrollable: maxHeight ? true : undefined
|
|
293
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
294
|
-
,
|
|
295
|
-
className: (0, _classnames.default)('ak-editor-content-area', {
|
|
296
|
-
'less-margin': width < _editorSharedStyles.akEditorMobileBreakoutPoint
|
|
297
|
-
}),
|
|
298
|
-
featureFlags: featureFlags,
|
|
299
|
-
viewMode: editorViewMode,
|
|
300
|
-
appearance: appearance,
|
|
301
|
-
useStandardNodeWidth: useStandardNodeWidth
|
|
302
|
-
}, customContentComponents && 'before' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents), (0, _react2.jsx)(_PluginSlot.default, {
|
|
303
|
-
editorView: editorView,
|
|
304
|
-
editorActions: editorActions,
|
|
305
|
-
eventDispatcher: eventDispatcher,
|
|
306
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
307
|
-
providerFactory: providerFactory,
|
|
308
|
-
appearance: appearance,
|
|
309
|
-
items: contentComponents,
|
|
310
|
-
popupsMountPoint: popupsMountPoint,
|
|
311
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
312
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
313
|
-
containerElement: containerElement.current,
|
|
314
|
-
disabled: !!disabled,
|
|
315
|
-
wrapperElement: wrapperElementRef.current,
|
|
316
|
-
pluginHooks: pluginHooks
|
|
317
|
-
}), editorDOMElement, customContentComponents && 'after' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.after) : null);
|
|
318
|
-
}))), showSecondaryToolbar && (0, _react2.jsx)("div", {
|
|
319
|
-
css: secondaryToolbarStyles,
|
|
320
|
-
"data-testid": "ak-editor-secondary-toolbar"
|
|
321
|
-
}, (0, _react2.jsx)(_buttonGroup.default, null, !!onSave && (0, _react2.jsx)(_button.default, {
|
|
322
|
-
appearance: "primary",
|
|
323
|
-
onClick: handleSave,
|
|
324
|
-
testId: "comment-save-button",
|
|
325
|
-
isDisabled: disabled || saveButtonDisabled,
|
|
326
|
-
interactionName: "editor-comment-save-button"
|
|
327
|
-
}, intl.formatMessage(_messages.default.saveButton)), !!onCancel && (0, _react2.jsx)(_button.default, {
|
|
328
|
-
appearance: "subtle",
|
|
329
|
-
onClick: handleCancel,
|
|
330
|
-
testId: "comment-cancel-button",
|
|
331
|
-
isDisabled: disabled,
|
|
332
|
-
interactionName: "editor-comment-cancel-button"
|
|
333
|
-
}, intl.formatMessage(_messages.default.cancelButton))), (0, _react2.jsx)("span", {
|
|
334
|
-
style: {
|
|
335
|
-
flexGrow: 1
|
|
336
|
-
}
|
|
337
|
-
}), customSecondaryToolbarComponents)));
|
|
338
|
-
};
|
|
339
|
-
CommentEditorWithIntlEmotion.displayName = 'CommentEditorAppearance';
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.FixedToolbarEmotion = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
/**
|
|
11
|
-
* @jsxRuntime classic
|
|
12
|
-
* @jsx jsx
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
16
|
-
* Used via `componentWithCondition` in `Toolbar.tsx`.
|
|
17
|
-
*
|
|
18
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
22
|
-
|
|
23
|
-
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
24
|
-
var mainToolbarWrapperStyleNew = (0, _react.css)({
|
|
25
|
-
position: 'relative',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)", " 0"),
|
|
28
|
-
display: 'flex',
|
|
29
|
-
height: 'auto',
|
|
30
|
-
backgroundColor: "var(--ds-surface, #FFFFFF)",
|
|
31
|
-
boxShadow: 'none',
|
|
32
|
-
paddingLeft: "var(--ds-space-250, 20px)",
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
34
|
-
'> div': {
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
36
|
-
'> div:first-of-type:not(style), > style:first-of-type + *': {
|
|
37
|
-
marginLeft: 0
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
41
|
-
'.block-type-btn': {
|
|
42
|
-
paddingLeft: 0
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/** keep default padding for entire toolbar */
|
|
47
|
-
var mainToolbarWithoutLeftPadding = (0, _react.css)({
|
|
48
|
-
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)", " 0")
|
|
49
|
-
});
|
|
50
|
-
var mainToolbarTwoLineStylesNew = (0, _react.css)({
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
52
|
-
'& > div': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
53
|
-
flexDirection: 'column-reverse',
|
|
54
|
-
alignItems: 'end',
|
|
55
|
-
display: 'flex',
|
|
56
|
-
justifyContent: 'flex-end'
|
|
57
|
-
}), '> div:first-of-type', (0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
59
|
-
'> div:nth-of-type(2)': {
|
|
60
|
-
justifyContent: 'flex-end',
|
|
61
|
-
display: 'flex'
|
|
62
|
-
}
|
|
63
|
-
}))
|
|
64
|
-
});
|
|
65
|
-
var mainToolbarWrapperStylesVisualRefresh = (0, _react.css)({
|
|
66
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
67
|
-
'span svg': {
|
|
68
|
-
maxWidth: '100%'
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
var mainToolbarRadius = (0, _react.css)({
|
|
72
|
-
borderRadius: "var(--ds-radius-medium, 6px)".concat(" ", "var(--ds-radius-medium, 6px)", " 0 0")
|
|
73
|
-
});
|
|
74
|
-
var editorModernisationToolbarStyle = (0, _react.css)({
|
|
75
|
-
borderRadius: "var(--ds-radius-xlarge, 12px)".concat(" ", "var(--ds-radius-xlarge, 12px)", " 0 0"),
|
|
76
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
|
-
'&.show-keyline': {
|
|
78
|
-
boxShadow: "var(--ds-shadow-overflow, 0px 0px 8px #1E1F2128, 0px 0px 1px #1E1F211e)"
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
var FixedToolbarEmotion = exports.FixedToolbarEmotion = function FixedToolbarEmotion(props) {
|
|
82
|
-
return (
|
|
83
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
84
|
-
(0, _react.jsx)("div", {
|
|
85
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle],
|
|
86
|
-
"data-testid": "ak-editor-main-toolbar"
|
|
87
|
-
}, props.children)
|
|
88
|
-
);
|
|
89
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.StickyToolbarEmotion = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
/**
|
|
13
|
-
* @jsxRuntime classic
|
|
14
|
-
* @jsx jsx
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
18
|
-
* Used via `componentWithCondition` in `Toolbar.tsx`.
|
|
19
|
-
*
|
|
20
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
24
|
-
|
|
25
|
-
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
26
|
-
var akEditorMenuZIndex = 500;
|
|
27
|
-
var akEditorToolbarKeylineHeight = 2;
|
|
28
|
-
var mainToolbarWrapperStyleNew = (0, _react2.css)({
|
|
29
|
-
position: 'relative',
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)", " 0"),
|
|
32
|
-
display: 'flex',
|
|
33
|
-
height: 'auto',
|
|
34
|
-
backgroundColor: "var(--ds-surface, #FFFFFF)",
|
|
35
|
-
boxShadow: 'none',
|
|
36
|
-
paddingLeft: "var(--ds-space-250, 20px)",
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
38
|
-
'> div': {
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
40
|
-
'> div:first-of-type:not(style), > style:first-of-type + *': {
|
|
41
|
-
marginLeft: 0
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
45
|
-
'.block-type-btn': {
|
|
46
|
-
paddingLeft: 0
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
var mainToolbarWithPadding = (0, _react2.css)({
|
|
50
|
-
padding: "var(--ds-space-100, 8px)"
|
|
51
|
-
});
|
|
52
|
-
var mainToolbarTwoLineStylesNew = (0, _react2.css)({
|
|
53
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
54
|
-
'& > div': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
55
|
-
flexDirection: 'column-reverse',
|
|
56
|
-
alignItems: 'end',
|
|
57
|
-
display: 'flex',
|
|
58
|
-
justifyContent: 'flex-end'
|
|
59
|
-
}), '> div:first-of-type', (0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
60
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
61
|
-
'> div:nth-of-type(2)': {
|
|
62
|
-
justifyContent: 'flex-end',
|
|
63
|
-
display: 'flex'
|
|
64
|
-
}
|
|
65
|
-
}))
|
|
66
|
-
});
|
|
67
|
-
var mainToolbarWrapperStylesVisualRefresh = (0, _react2.css)({
|
|
68
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
69
|
-
'span svg': {
|
|
70
|
-
maxWidth: '100%'
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
var mainToolbarRadius = (0, _react2.css)({
|
|
74
|
-
borderRadius: "var(--ds-radius-medium, 6px)".concat(" ", "var(--ds-radius-medium, 6px)", " 0 0")
|
|
75
|
-
});
|
|
76
|
-
var editorModernisationToolbarStyle = (0, _react2.css)({
|
|
77
|
-
borderRadius: "var(--ds-radius-xlarge, 12px)".concat(" ", "var(--ds-radius-xlarge, 12px)", " 0 0"),
|
|
78
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
79
|
-
'&.show-keyline': {
|
|
80
|
-
boxShadow: "var(--ds-shadow-overflow, 0px 0px 8px #1E1F2128, 0px 0px 1px #1E1F211e)"
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
var stickyToolbarWrapperStyleNew = (0, _react2.css)({
|
|
84
|
-
position: 'sticky',
|
|
85
|
-
paddingBottom: "var(--ds-space-100, 8px)",
|
|
86
|
-
zIndex: akEditorMenuZIndex,
|
|
87
|
-
transition: 'box-shadow ease-in-out 0.2s',
|
|
88
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
89
|
-
'&.show-keyline': {
|
|
90
|
-
boxShadow: "0 ".concat(akEditorToolbarKeylineHeight, "px 0 0 ", "var(--ds-background-accent-gray-subtlest, #F0F1F2)")
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
var StickyToolbarEmotion = exports.StickyToolbarEmotion = function StickyToolbarEmotion(props) {
|
|
94
|
-
var _useState = (0, _react.useState)(0),
|
|
95
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
96
|
-
top = _useState2[0],
|
|
97
|
-
setTop = _useState2[1];
|
|
98
|
-
|
|
99
|
-
// ED-15802: if externalToolbarRef is passed in, set top to externalToolbarRef?.current?.clientHeight
|
|
100
|
-
// else if offsetTop is a number set top to offsetTop
|
|
101
|
-
// otherwise top is 0 as initial state
|
|
102
|
-
(0, _react.useEffect)(function () {
|
|
103
|
-
var _props$externalToolba;
|
|
104
|
-
if ((_props$externalToolba = props.externalToolbarRef) !== null && _props$externalToolba !== void 0 && (_props$externalToolba = _props$externalToolba.current) !== null && _props$externalToolba !== void 0 && _props$externalToolba.clientHeight) {
|
|
105
|
-
setTop(props.externalToolbarRef.current.clientHeight);
|
|
106
|
-
} else {
|
|
107
|
-
setTop(props.offsetTop || 0);
|
|
108
|
-
}
|
|
109
|
-
}, [props.externalToolbarRef, props.offsetTop]);
|
|
110
|
-
var wrapperStyle = {
|
|
111
|
-
top: "".concat(top, "px")
|
|
112
|
-
};
|
|
113
|
-
return (
|
|
114
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
115
|
-
(0, _react2.jsx)("div", {
|
|
116
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle]
|
|
117
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- top is computed dynamically from externalToolbarRef height / offsetTop and cannot be a static css value
|
|
118
|
-
,
|
|
119
|
-
style: wrapperStyle,
|
|
120
|
-
"data-testid": "ak-editor-main-toolbar"
|
|
121
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
122
|
-
,
|
|
123
|
-
className: 'show-keyline'
|
|
124
|
-
}, props.children)
|
|
125
|
-
);
|
|
126
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* BeforeWrapper-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
/**
|
|
3
|
-
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
4
|
-
* Used via `componentWithCondition` in `BeforeWrapper.tsx`.
|
|
5
|
-
*
|
|
6
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
-
*/
|
|
8
|
-
"use strict";
|
|
9
|
-
|
|
10
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
|
12
|
-
value: true
|
|
13
|
-
});
|
|
14
|
-
exports.BeforePrimaryToolbarWrapperCompiled = void 0;
|
|
15
|
-
require("./BeforeWrapper-compiled.compiled.css");
|
|
16
|
-
var React = _interopRequireWildcard(require("react"));
|
|
17
|
-
var _runtime = require("@compiled/react/runtime");
|
|
18
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
|
-
var styles = {
|
|
20
|
-
beforePrimaryToolbarPluginWrapper: "_1e0c1txw _16jlkb7n _1bahesu3 _4cvr1h6o"
|
|
21
|
-
};
|
|
22
|
-
// Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
|
|
23
|
-
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
24
|
-
var BeforePrimaryToolbarWrapperCompiled = exports.BeforePrimaryToolbarWrapperCompiled = function BeforePrimaryToolbarWrapperCompiled(props) {
|
|
25
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
-
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
27
|
-
className: (0, _runtime.ax)([styles.beforePrimaryToolbarPluginWrapper])
|
|
28
|
-
}, props.beforePrimaryToolbarComponents);
|
|
29
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BeforePrimaryToolbarWrapperEmotion = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
/**
|
|
9
|
-
* @jsxRuntime classic
|
|
10
|
-
* @jsx jsx
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
14
|
-
* Used via `componentWithCondition` in `BeforeWrapper.tsx`.
|
|
15
|
-
*
|
|
16
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback; jsx required at runtime for @jsxRuntime classic
|
|
20
|
-
|
|
21
|
-
var beforePrimaryToolbarPluginWrapperStyles = (0, _react.css)({
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexGrow: 1,
|
|
24
|
-
justifyContent: 'flex-end',
|
|
25
|
-
alignItems: 'center'
|
|
26
|
-
});
|
|
27
|
-
// Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
|
|
28
|
-
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
29
|
-
var BeforePrimaryToolbarWrapperEmotion = exports.BeforePrimaryToolbarWrapperEmotion = function BeforePrimaryToolbarWrapperEmotion(props) {
|
|
30
|
-
return (0, _react.jsx)("div", {
|
|
31
|
-
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
32
|
-
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
33
|
-
}, props.beforePrimaryToolbarComponents);
|
|
34
|
-
};
|