@atlaskit/editor-core 189.1.12 → 189.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/insert-block/index.js +6 -10
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +40 -38
- package/dist/cjs/plugins/panel/actions.js +11 -11
- package/dist/cjs/plugins/panel/index.js +4 -4
- package/dist/cjs/plugins/panel/nodeviews/panel.js +5 -5
- package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +7 -7
- package/dist/cjs/plugins/panel/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/panel/toolbar.js +16 -16
- package/dist/cjs/plugins/panel/utils.js +1 -1
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/ContentStyles/index.js +7 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/i18n/cs.js +0 -1
- package/dist/es2019/i18n/da.js +0 -1
- package/dist/es2019/i18n/de.js +0 -1
- package/dist/es2019/i18n/en.js +0 -1
- package/dist/es2019/i18n/en_GB.js +0 -1
- package/dist/es2019/i18n/en_ZZ.js +0 -1
- package/dist/es2019/i18n/es.js +0 -1
- package/dist/es2019/i18n/fi.js +0 -1
- package/dist/es2019/i18n/fr.js +0 -1
- package/dist/es2019/i18n/hu.js +0 -1
- package/dist/es2019/i18n/it.js +0 -1
- package/dist/es2019/i18n/ja.js +0 -1
- package/dist/es2019/i18n/ko.js +0 -1
- package/dist/es2019/i18n/nb.js +0 -1
- package/dist/es2019/i18n/nl.js +0 -1
- package/dist/es2019/i18n/pl.js +0 -1
- package/dist/es2019/i18n/pt_BR.js +0 -1
- package/dist/es2019/i18n/ru.js +0 -1
- package/dist/es2019/i18n/sv.js +0 -1
- package/dist/es2019/i18n/th.js +0 -1
- package/dist/es2019/i18n/tr.js +0 -1
- package/dist/es2019/i18n/uk.js +0 -1
- package/dist/es2019/i18n/vi.js +0 -1
- package/dist/es2019/i18n/zh.js +0 -1
- package/dist/es2019/i18n/zh_TW.js +0 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/insert-block/index.js +5 -9
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -3
- package/dist/es2019/plugins/panel/actions.js +5 -5
- package/dist/es2019/plugins/panel/index.js +6 -6
- package/dist/es2019/plugins/panel/nodeviews/panel.js +5 -5
- package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +2 -2
- package/dist/es2019/plugins/panel/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/panel/toolbar.js +12 -13
- package/dist/es2019/plugins/panel/utils.js +1 -1
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/ContentStyles/index.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/i18n/cs.js +0 -1
- package/dist/esm/i18n/da.js +0 -1
- package/dist/esm/i18n/de.js +0 -1
- package/dist/esm/i18n/en.js +0 -1
- package/dist/esm/i18n/en_GB.js +0 -1
- package/dist/esm/i18n/en_ZZ.js +0 -1
- package/dist/esm/i18n/es.js +0 -1
- package/dist/esm/i18n/fi.js +0 -1
- package/dist/esm/i18n/fr.js +0 -1
- package/dist/esm/i18n/hu.js +0 -1
- package/dist/esm/i18n/it.js +0 -1
- package/dist/esm/i18n/ja.js +0 -1
- package/dist/esm/i18n/ko.js +0 -1
- package/dist/esm/i18n/nb.js +0 -1
- package/dist/esm/i18n/nl.js +0 -1
- package/dist/esm/i18n/pl.js +0 -1
- package/dist/esm/i18n/pt_BR.js +0 -1
- package/dist/esm/i18n/ru.js +0 -1
- package/dist/esm/i18n/sv.js +0 -1
- package/dist/esm/i18n/th.js +0 -1
- package/dist/esm/i18n/tr.js +0 -1
- package/dist/esm/i18n/uk.js +0 -1
- package/dist/esm/i18n/vi.js +0 -1
- package/dist/esm/i18n/zh.js +0 -1
- package/dist/esm/i18n/zh_TW.js +0 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/insert-block/index.js +5 -9
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +40 -38
- package/dist/esm/plugins/panel/actions.js +5 -5
- package/dist/esm/plugins/panel/index.js +6 -6
- package/dist/esm/plugins/panel/nodeviews/panel.js +5 -5
- package/dist/esm/plugins/panel/pm-plugins/keymaps.js +2 -2
- package/dist/esm/plugins/panel/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/panel/toolbar.js +12 -13
- package/dist/esm/plugins/panel/utils.js +1 -1
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/ContentStyles/index.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/i18n/cs.d.ts +0 -1
- package/dist/types/i18n/da.d.ts +0 -1
- package/dist/types/i18n/de.d.ts +0 -1
- package/dist/types/i18n/en.d.ts +0 -1
- package/dist/types/i18n/en_GB.d.ts +0 -1
- package/dist/types/i18n/en_ZZ.d.ts +0 -1
- package/dist/types/i18n/es.d.ts +0 -1
- package/dist/types/i18n/fi.d.ts +0 -1
- package/dist/types/i18n/fr.d.ts +0 -1
- package/dist/types/i18n/hu.d.ts +0 -1
- package/dist/types/i18n/it.d.ts +0 -1
- package/dist/types/i18n/ja.d.ts +0 -1
- package/dist/types/i18n/ko.d.ts +0 -1
- package/dist/types/i18n/nb.d.ts +0 -1
- package/dist/types/i18n/nl.d.ts +0 -1
- package/dist/types/i18n/pl.d.ts +0 -1
- package/dist/types/i18n/pt_BR.d.ts +0 -1
- package/dist/types/i18n/ru.d.ts +0 -1
- package/dist/types/i18n/sv.d.ts +0 -1
- package/dist/types/i18n/th.d.ts +0 -1
- package/dist/types/i18n/tr.d.ts +0 -1
- package/dist/types/i18n/uk.d.ts +0 -1
- package/dist/types/i18n/vi.d.ts +0 -1
- package/dist/types/i18n/zh.d.ts +0 -1
- package/dist/types/i18n/zh_TW.d.ts +0 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/panel/actions.d.ts +2 -2
- package/dist/types/plugins/panel/index.d.ts +3 -3
- package/dist/types/plugins/panel/nodeviews/panel.d.ts +3 -3
- package/dist/types/plugins/panel/pm-plugins/main.d.ts +2 -2
- package/dist/types/plugins/panel/toolbar.d.ts +6 -7
- package/dist/types/plugins/panel/types.d.ts +1 -1
- package/dist/types/plugins/panel/utils.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/{plugins/panel/styles.d.ts → ui/ContentStyles/panel.d.ts} +1 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -1
- package/dist/types-ts4.5/i18n/da.d.ts +0 -1
- package/dist/types-ts4.5/i18n/de.d.ts +0 -1
- package/dist/types-ts4.5/i18n/en.d.ts +0 -1
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -1
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -1
- package/dist/types-ts4.5/i18n/es.d.ts +0 -1
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -1
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -1
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -1
- package/dist/types-ts4.5/i18n/it.d.ts +0 -1
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -1
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -1
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -1
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -1
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -1
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -1
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -1
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -1
- package/dist/types-ts4.5/i18n/th.d.ts +0 -1
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -1
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -1
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -1
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -1
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/panel/actions.d.ts +2 -2
- package/dist/types-ts4.5/plugins/panel/index.d.ts +3 -3
- package/dist/types-ts4.5/plugins/panel/nodeviews/panel.d.ts +3 -3
- package/dist/types-ts4.5/plugins/panel/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/plugins/panel/toolbar.d.ts +6 -7
- package/dist/types-ts4.5/plugins/panel/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/panel/utils.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types-ts4.5/{plugins/panel/styles.d.ts → ui/ContentStyles/panel.d.ts} +1 -1
- package/package.json +4 -3
- package/report.api.md +1 -6
- package/tmp/api-report-tmp.d.ts +1 -6
- package/dist/cjs/plugins/placeholder-text/actions.js +0 -35
- package/dist/cjs/plugins/placeholder-text/fake-text-cursor/cursor.js +0 -107
- package/dist/cjs/plugins/placeholder-text/index.js +0 -20
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +0 -89
- package/dist/cjs/plugins/placeholder-text/plugin-key.js +0 -8
- package/dist/cjs/plugins/placeholder-text/plugin.js +0 -267
- package/dist/cjs/plugins/placeholder-text/selection-utils.js +0 -14
- package/dist/cjs/plugins/placeholder-text/styles.js +0 -13
- package/dist/cjs/plugins/placeholder-text/types.js +0 -5
- package/dist/cjs/plugins/placeholder-text/ui/FloatingToolbar/index.js +0 -86
- package/dist/cjs/plugins/placeholder-text/ui/FloatingToolbar/styles.js +0 -15
- package/dist/cjs/plugins/placeholder-text/ui/FloatingToolbar/utils.js +0 -54
- package/dist/cjs/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +0 -89
- package/dist/es2019/plugins/placeholder-text/actions.js +0 -27
- package/dist/es2019/plugins/placeholder-text/fake-text-cursor/cursor.js +0 -77
- package/dist/es2019/plugins/placeholder-text/index.js +0 -2
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +0 -77
- package/dist/es2019/plugins/placeholder-text/plugin-key.js +0 -2
- package/dist/es2019/plugins/placeholder-text/plugin.js +0 -247
- package/dist/es2019/plugins/placeholder-text/selection-utils.js +0 -8
- package/dist/es2019/plugins/placeholder-text/styles.js +0 -52
- package/dist/es2019/plugins/placeholder-text/types.js +0 -1
- package/dist/es2019/plugins/placeholder-text/ui/FloatingToolbar/index.js +0 -45
- package/dist/es2019/plugins/placeholder-text/ui/FloatingToolbar/styles.js +0 -15
- package/dist/es2019/plugins/placeholder-text/ui/FloatingToolbar/utils.js +0 -41
- package/dist/es2019/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +0 -60
- package/dist/esm/plugins/placeholder-text/actions.js +0 -29
- package/dist/esm/plugins/placeholder-text/fake-text-cursor/cursor.js +0 -100
- package/dist/esm/plugins/placeholder-text/index.js +0 -2
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +0 -82
- package/dist/esm/plugins/placeholder-text/plugin-key.js +0 -2
- package/dist/esm/plugins/placeholder-text/plugin.js +0 -259
- package/dist/esm/plugins/placeholder-text/selection-utils.js +0 -8
- package/dist/esm/plugins/placeholder-text/styles.js +0 -6
- package/dist/esm/plugins/placeholder-text/types.js +0 -1
- package/dist/esm/plugins/placeholder-text/ui/FloatingToolbar/index.js +0 -63
- package/dist/esm/plugins/placeholder-text/ui/FloatingToolbar/styles.js +0 -8
- package/dist/esm/plugins/placeholder-text/ui/FloatingToolbar/utils.js +0 -48
- package/dist/esm/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +0 -79
- package/dist/types/plugins/placeholder-text/actions.d.ts +0 -4
- package/dist/types/plugins/placeholder-text/fake-text-cursor/cursor.d.ts +0 -30
- package/dist/types/plugins/placeholder-text/index.d.ts +0 -3
- package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +0 -17
- package/dist/types/plugins/placeholder-text/plugin-key.d.ts +0 -3
- package/dist/types/plugins/placeholder-text/plugin.d.ts +0 -7
- package/dist/types/plugins/placeholder-text/selection-utils.d.ts +0 -2
- package/dist/types/plugins/placeholder-text/styles.d.ts +0 -1
- package/dist/types/plugins/placeholder-text/types.d.ts +0 -18
- package/dist/types/plugins/placeholder-text/ui/FloatingToolbar/index.d.ts +0 -28
- package/dist/types/plugins/placeholder-text/ui/FloatingToolbar/styles.d.ts +0 -1
- package/dist/types/plugins/placeholder-text/ui/FloatingToolbar/utils.d.ts +0 -13
- package/dist/types/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +0 -25
- package/dist/types-ts4.5/plugins/placeholder-text/actions.d.ts +0 -4
- package/dist/types-ts4.5/plugins/placeholder-text/fake-text-cursor/cursor.d.ts +0 -30
- package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/placeholder-text/placeholder-text-nodeview.d.ts +0 -17
- package/dist/types-ts4.5/plugins/placeholder-text/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/placeholder-text/plugin.d.ts +0 -7
- package/dist/types-ts4.5/plugins/placeholder-text/selection-utils.d.ts +0 -2
- package/dist/types-ts4.5/plugins/placeholder-text/styles.d.ts +0 -1
- package/dist/types-ts4.5/plugins/placeholder-text/types.d.ts +0 -18
- package/dist/types-ts4.5/plugins/placeholder-text/ui/FloatingToolbar/index.d.ts +0 -28
- package/dist/types-ts4.5/plugins/placeholder-text/ui/FloatingToolbar/styles.d.ts +0 -1
- package/dist/types-ts4.5/plugins/placeholder-text/ui/FloatingToolbar/utils.d.ts +0 -13
- package/dist/types-ts4.5/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +0 -25
- /package/dist/cjs/{plugins/panel/styles.js → ui/ContentStyles/panel.js} +0 -0
- /package/dist/es2019/{plugins/panel/styles.js → ui/ContentStyles/panel.js} +0 -0
- /package/dist/esm/{plugins/panel/styles.js → ui/ContentStyles/panel.js} +0 -0
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PanelType } from '@atlaskit/adf-schema';
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
4
|
+
import commonMessages from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
|
|
6
|
+
import { DEFAULT_BORDER_COLOR, panelBackgroundPalette } from '@atlaskit/editor-common/ui-color';
|
|
7
|
+
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
8
|
+
import ErrorIcon from '@atlaskit/icon/glyph/editor/error';
|
|
2
9
|
import InfoIcon from '@atlaskit/icon/glyph/editor/info';
|
|
3
10
|
import NoteIcon from '@atlaskit/icon/glyph/editor/note';
|
|
4
11
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
5
|
-
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
6
|
-
import ErrorIcon from '@atlaskit/icon/glyph/editor/error';
|
|
7
12
|
import RemoveEmojiIcon from '@atlaskit/icon/glyph/editor/remove-emoji';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
|
|
12
|
-
import { findPanel } from './utils';
|
|
13
|
-
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
14
|
-
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
15
|
-
import { PanelType } from '@atlaskit/adf-schema';
|
|
16
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
17
|
-
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
13
|
+
import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
14
|
+
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
15
|
+
import { changePanelType, removePanel } from './actions';
|
|
18
16
|
import { messages } from './message';
|
|
17
|
+
import { findPanel } from './utils';
|
|
19
18
|
export const panelIconMap = {
|
|
20
19
|
[PanelType.INFO]: {
|
|
21
20
|
shortName: ':info:',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { findSelectedNodeOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
2
1
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
3
2
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
4
3
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
4
|
+
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
export const findPanel = (state, selection) => {
|
|
6
6
|
const {
|
|
7
7
|
panel
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin,
|
|
1
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
2
2
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
3
3
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
4
4
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
@@ -24,6 +24,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
24
24
|
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
25
25
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
26
26
|
import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
27
|
+
import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
27
28
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
28
29
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
29
30
|
import { createDefaultPreset } from './default';
|
|
@@ -11,8 +11,8 @@ import { textHighlightStyle } from '@atlaskit/editor-plugin-paste-options-toolba
|
|
|
11
11
|
import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
12
12
|
import { mediaStyles } from './media';
|
|
13
13
|
import { layoutStyles } from './layout';
|
|
14
|
-
import { panelStyles } from '
|
|
15
|
-
import { placeholderTextStyles } from '
|
|
14
|
+
import { panelStyles } from './panel';
|
|
15
|
+
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
16
16
|
import { extensionStyles } from '../../plugins/extension/ui/styles';
|
|
17
17
|
import { expandStyles } from '../../plugins/expand/ui/styles';
|
|
18
18
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
package/dist/esm/i18n/cs.js
CHANGED
|
@@ -65,7 +65,6 @@ export default {
|
|
|
65
65
|
'fabric.editor.single': 'Jeden sloupec',
|
|
66
66
|
'fabric.editor.success': 'Úspěch',
|
|
67
67
|
'fabric.editor.taskPlaceholder': 'Napište svou akci a použitím „@“ ji někomu přidělte.',
|
|
68
|
-
'fabric.editor.textColor': 'Barva textu',
|
|
69
68
|
'fabric.editor.threeColumns': 'Tři sloupce',
|
|
70
69
|
'fabric.editor.threeColumnsWithSidebars': 'Tři sloupce s postranními panely',
|
|
71
70
|
'fabric.editor.twoColumns': 'Dva sloupce',
|
package/dist/esm/i18n/da.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Enkelt kolonne',
|
|
65
65
|
'fabric.editor.success': 'Succes',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Indtast din handling, og brug "@" for at tildele til nogen.',
|
|
67
|
-
'fabric.editor.textColor': 'Tekstfarve',
|
|
68
67
|
'fabric.editor.threeColumns': 'Tre kolonner',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Tre kolonner med sidebjælker',
|
|
70
69
|
'fabric.editor.twoColumns': 'To kolonner',
|
package/dist/esm/i18n/de.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Einzelne Spalte',
|
|
65
65
|
'fabric.editor.success': 'Erfolgreich',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Geben Sie Ihre Aktion ein und weisen Sie sie mithilfe von „@” jemandem zu.',
|
|
67
|
-
'fabric.editor.textColor': 'Textfarbe',
|
|
68
67
|
'fabric.editor.threeColumns': 'Drei Spalten',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Drei Spalten mit Seitenleisten',
|
|
70
69
|
'fabric.editor.twoColumns': 'Zwei Spalten',
|
package/dist/esm/i18n/en.js
CHANGED
|
@@ -66,7 +66,6 @@ export default {
|
|
|
66
66
|
'fabric.editor.single': 'Single column',
|
|
67
67
|
'fabric.editor.success': 'Success',
|
|
68
68
|
'fabric.editor.taskPlaceholder': "Type your action, use '@' to assign to someone.",
|
|
69
|
-
'fabric.editor.textColor': 'Text color',
|
|
70
69
|
'fabric.editor.threeColumns': 'Three columns',
|
|
71
70
|
'fabric.editor.threeColumnsWithSidebars': 'Three columns with sidebars',
|
|
72
71
|
'fabric.editor.twoColumns': 'Two columns',
|
package/dist/esm/i18n/en_GB.js
CHANGED
|
@@ -66,7 +66,6 @@ export default {
|
|
|
66
66
|
'fabric.editor.single': 'Single column',
|
|
67
67
|
'fabric.editor.success': 'Success',
|
|
68
68
|
'fabric.editor.taskPlaceholder': "Type your action, use '@' to assign to someone.",
|
|
69
|
-
'fabric.editor.textColor': 'Text colour',
|
|
70
69
|
'fabric.editor.threeColumns': 'Three columns',
|
|
71
70
|
'fabric.editor.threeColumnsWithSidebars': 'Three columns with sidebars',
|
|
72
71
|
'fabric.editor.twoColumns': 'Two columns',
|
package/dist/esm/i18n/en_ZZ.js
CHANGED
|
@@ -66,7 +66,6 @@ export default {
|
|
|
66
66
|
'fabric.editor.single': 'Single column',
|
|
67
67
|
'fabric.editor.success': 'Success',
|
|
68
68
|
'fabric.editor.taskPlaceholder': "Type your action, use '@' to assign to someone.",
|
|
69
|
-
'fabric.editor.textColor': 'Text color',
|
|
70
69
|
'fabric.editor.threeColumns': 'Three columns',
|
|
71
70
|
'fabric.editor.threeColumnsWithSidebars': 'Three columns with sidebars',
|
|
72
71
|
'fabric.editor.twoColumns': 'Two columns',
|
package/dist/esm/i18n/es.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Una sola columna',
|
|
65
65
|
'fabric.editor.success': 'Correcto',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Escribe la acción y usa "@" para asignársela a alguien.',
|
|
67
|
-
'fabric.editor.textColor': 'Color del texto',
|
|
68
67
|
'fabric.editor.threeColumns': 'Tres columnas',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Tres columnas con barras laterales',
|
|
70
69
|
'fabric.editor.twoColumns': 'Dos columnas',
|
package/dist/esm/i18n/fi.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Yksittäinen sarake',
|
|
65
65
|
'fabric.editor.success': 'Onnistunut',
|
|
66
66
|
'fabric.editor.taskPlaceholder': "Kirjoita toimintasi, käytä '@'-merkkiä määrätäksesi sen jollekin henkilölle.",
|
|
67
|
-
'fabric.editor.textColor': 'Tekstin väri',
|
|
68
67
|
'fabric.editor.threeColumns': 'Kolme saraketta',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Kolme saraketta sivupalkkien kanssa',
|
|
70
69
|
'fabric.editor.twoColumns': 'Kaksi saraketta',
|
package/dist/esm/i18n/fr.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Colonne unique',
|
|
65
65
|
'fabric.editor.success': 'Opération réussie',
|
|
66
66
|
'fabric.editor.taskPlaceholder': "Saisissez votre action, utilisez « @ » pour l'assigner à quelqu'un.",
|
|
67
|
-
'fabric.editor.textColor': 'Couleur du texte',
|
|
68
67
|
'fabric.editor.threeColumns': 'Trois colonnes',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Trois colonnes avec barres latérales',
|
|
70
69
|
'fabric.editor.twoColumns': 'Deux colonnes',
|
package/dist/esm/i18n/hu.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Egy oszlop',
|
|
65
65
|
'fabric.editor.success': 'Sikerült',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Írja be a műveletet. Az „@” jellel hozzárendelheti valakihez.',
|
|
67
|
-
'fabric.editor.textColor': 'Szövegszín',
|
|
68
67
|
'fabric.editor.threeColumns': 'Három oszlop',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Három oszlop oldalsávval',
|
|
70
69
|
'fabric.editor.twoColumns': 'Két oszlop',
|
package/dist/esm/i18n/it.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Colonna singola',
|
|
65
65
|
'fabric.editor.success': 'Operazione riuscita',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Digita la tua azione e usa “@” per assegnarla a qualcuno.',
|
|
67
|
-
'fabric.editor.textColor': 'Colore del testo',
|
|
68
67
|
'fabric.editor.threeColumns': 'Tre colonne',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Tre colonne con barre laterali',
|
|
70
69
|
'fabric.editor.twoColumns': 'Due colonne',
|
package/dist/esm/i18n/ja.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': '単一列',
|
|
65
65
|
'fabric.editor.success': '成功',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'アクションを入力し、「@」を使用して担当者を割り当てます。',
|
|
67
|
-
'fabric.editor.textColor': 'テキストの色',
|
|
68
67
|
'fabric.editor.threeColumns': '3 列',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'サイドバーを使用した 3 列レイアウト',
|
|
70
69
|
'fabric.editor.twoColumns': '2 列',
|
package/dist/esm/i18n/ko.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': '단일 열',
|
|
65
65
|
'fabric.editor.success': '성공',
|
|
66
66
|
'fabric.editor.taskPlaceholder': "작업을 입력하고 '@'를 사용하여 할당합니다.",
|
|
67
|
-
'fabric.editor.textColor': '텍스트 색상',
|
|
68
67
|
'fabric.editor.threeColumns': '세 개 열',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': '사이드바가 있는 세 개 열',
|
|
70
69
|
'fabric.editor.twoColumns': '두 개 열',
|
package/dist/esm/i18n/nb.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Enkeltkolonne',
|
|
65
65
|
'fabric.editor.success': 'Vellykket',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Skriv inn handlingen. Bruk @ for å tilordne den til noen.',
|
|
67
|
-
'fabric.editor.textColor': 'Tekstfarge',
|
|
68
67
|
'fabric.editor.threeColumns': 'Tre kolonner',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Tre kolonner med sidelinjer',
|
|
70
69
|
'fabric.editor.twoColumns': 'To kolonner',
|
package/dist/esm/i18n/nl.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Eén kolom',
|
|
65
65
|
'fabric.editor.success': 'Gelukt',
|
|
66
66
|
'fabric.editor.taskPlaceholder': "Geef je actie in en gebruik een '@' om de actie aan iemand toe te wijzen.",
|
|
67
|
-
'fabric.editor.textColor': 'Tekstkleur',
|
|
68
67
|
'fabric.editor.threeColumns': 'Drie kolommen',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Drie kolommen met zijbalken',
|
|
70
69
|
'fabric.editor.twoColumns': 'Twee kolommen',
|
package/dist/esm/i18n/pl.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Pojedyncza kolumna',
|
|
65
65
|
'fabric.editor.success': 'Sukces',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Wprowadź swoją akcję, użyj „@”, aby przypisać ją do użytkownika.',
|
|
67
|
-
'fabric.editor.textColor': 'Kolor tekstu',
|
|
68
67
|
'fabric.editor.threeColumns': 'Trzy kolumny',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Trzy kolumny z paskami bocznymi',
|
|
70
69
|
'fabric.editor.twoColumns': 'Dwie kolumny',
|
package/dist/esm/i18n/pt_BR.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Coluna única',
|
|
65
65
|
'fabric.editor.success': 'Sucesso',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Digite sua ação e use "@" para atribuí-la a alguém.',
|
|
67
|
-
'fabric.editor.textColor': 'Cor do texto',
|
|
68
67
|
'fabric.editor.threeColumns': 'Três colunas',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Três colunas com barras laterais',
|
|
70
69
|
'fabric.editor.twoColumns': 'Duas colunas',
|
package/dist/esm/i18n/ru.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Один столбец',
|
|
65
65
|
'fabric.editor.success': 'Готово',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Укажите задание и назначьте исполнителя с помощью значка «@».',
|
|
67
|
-
'fabric.editor.textColor': 'Цвет текста',
|
|
68
67
|
'fabric.editor.threeColumns': 'Три столбца',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Три столбца с боковыми панелями',
|
|
70
69
|
'fabric.editor.twoColumns': 'Два столбца',
|
package/dist/esm/i18n/sv.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Enkel kolumn',
|
|
65
65
|
'fabric.editor.success': 'Klart!',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Skriv din åtgärd och använd @ för att tilldela någon.',
|
|
67
|
-
'fabric.editor.textColor': 'Textfärg',
|
|
68
67
|
'fabric.editor.threeColumns': 'Tre kolumner',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Tre kolumner med sidopaneler',
|
|
70
69
|
'fabric.editor.twoColumns': 'Två kolumner',
|
package/dist/esm/i18n/th.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'คอลัมน์เดียว',
|
|
65
65
|
'fabric.editor.success': 'สำเร็จ',
|
|
66
66
|
'fabric.editor.taskPlaceholder': "พิมพ์ข้อความของคุณ ใช้ '@' เพื่อมอบหมายให้ผู้ใช้ที่คุณเลือก",
|
|
67
|
-
'fabric.editor.textColor': 'สีข้อความ',
|
|
68
67
|
'fabric.editor.threeColumns': 'สามคอลัมน์',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'สามคอลัมน์พร้อมแถบด้านข้าง',
|
|
70
69
|
'fabric.editor.twoColumns': 'สองคอลัมน์',
|
package/dist/esm/i18n/tr.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Tek sütun',
|
|
65
65
|
'fabric.editor.success': 'Başarılı',
|
|
66
66
|
'fabric.editor.taskPlaceholder': "Yapılacak eylemi yazın, birine atamak için '@' kullanın.",
|
|
67
|
-
'fabric.editor.textColor': 'Metin rengi',
|
|
68
67
|
'fabric.editor.threeColumns': 'Üç sütun',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Kenar çubuklu üç sütun',
|
|
70
69
|
'fabric.editor.twoColumns': 'İki sütun',
|
package/dist/esm/i18n/uk.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Один стовпець',
|
|
65
65
|
'fabric.editor.success': 'Готово',
|
|
66
66
|
'fabric.editor.taskPlaceholder': 'Вкажіть задачу. Призначте її комусь за допомогою символу «@».',
|
|
67
|
-
'fabric.editor.textColor': 'Колір тексту',
|
|
68
67
|
'fabric.editor.threeColumns': 'Три стовпці',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Три стовпці з бічними панелями',
|
|
70
69
|
'fabric.editor.twoColumns': 'Два стовпці',
|
package/dist/esm/i18n/vi.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': 'Cột đơn',
|
|
65
65
|
'fabric.editor.success': 'Thành công',
|
|
66
66
|
'fabric.editor.taskPlaceholder': "Nhập thao tác của bạn, sử dụng '@' để chỉ định cho người nào đó.",
|
|
67
|
-
'fabric.editor.textColor': 'Màu văn bản',
|
|
68
67
|
'fabric.editor.threeColumns': 'Ba cột',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': 'Ba cột có các thanh bên',
|
|
70
69
|
'fabric.editor.twoColumns': 'Hai cột',
|
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': '单列',
|
|
65
65
|
'fabric.editor.success': '成功',
|
|
66
66
|
'fabric.editor.taskPlaceholder': '输入您的操作,使用“@”进行分配。',
|
|
67
|
-
'fabric.editor.textColor': '文本颜色',
|
|
68
67
|
'fabric.editor.threeColumns': '三栏',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': '具有侧边栏的三列',
|
|
70
69
|
'fabric.editor.twoColumns': '两栏',
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
'fabric.editor.single': '單欄',
|
|
65
65
|
'fabric.editor.success': '成功',
|
|
66
66
|
'fabric.editor.taskPlaceholder': '輸入動作,使用「@」以指派給他人。',
|
|
67
|
-
'fabric.editor.textColor': '文字顏色',
|
|
68
67
|
'fabric.editor.threeColumns': '三欄',
|
|
69
68
|
'fabric.editor.threeColumnsWithSidebars': '三個包含資訊看板的直欄',
|
|
70
69
|
'fabric.editor.twoColumns': '兩欄',
|
|
@@ -9,7 +9,6 @@ export { default as macroPlugin } from './macro';
|
|
|
9
9
|
export { default as maxContentSizePlugin } from './max-content-size';
|
|
10
10
|
export { default as panelPlugin } from './panel';
|
|
11
11
|
export { default as pastePlugin } from './paste';
|
|
12
|
-
export { placeholderTextPlugin } from './placeholder-text';
|
|
13
12
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
14
13
|
export { default as breakoutPlugin } from './breakout';
|
|
15
14
|
export { default as alignmentPlugin } from './alignment';
|
|
@@ -5,7 +5,6 @@ import WithPluginState from '../../ui/WithPluginState';
|
|
|
5
5
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
6
6
|
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
|
|
7
7
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import { pluginKey as placeholderTextStateKey } from '../placeholder-text/plugin-key';
|
|
9
8
|
import { pluginKey as macroStateKey } from '../macro/plugin-key';
|
|
10
9
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
11
10
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
@@ -67,13 +66,11 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
67
66
|
// `ToolbarInsertBlockWithInjectionApi` and remove `WithPluginState`
|
|
68
67
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
69
68
|
plugins: {
|
|
70
|
-
macroState: macroStateKey
|
|
71
|
-
placeholderTextState: placeholderTextStateKey
|
|
69
|
+
macroState: macroStateKey
|
|
72
70
|
},
|
|
73
71
|
render: function render(_ref3) {
|
|
74
72
|
var _ref3$macroState = _ref3.macroState,
|
|
75
|
-
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState
|
|
76
|
-
placeholderTextState = _ref3.placeholderTextState;
|
|
73
|
+
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState;
|
|
77
74
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlockWithInjectionApi, {
|
|
78
75
|
pluginInjectionApi: api,
|
|
79
76
|
editorView: editorView,
|
|
@@ -89,7 +86,6 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
89
86
|
isLastItem: isLastItem,
|
|
90
87
|
featureFlags: featureFlags,
|
|
91
88
|
macroState: macroState,
|
|
92
|
-
placeholderTextState: placeholderTextState,
|
|
93
89
|
providers: providers,
|
|
94
90
|
options: options
|
|
95
91
|
});
|
|
@@ -120,10 +116,9 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
120
116
|
pluginInjectionApi = _ref4.pluginInjectionApi,
|
|
121
117
|
options = _ref4.options,
|
|
122
118
|
macroState = _ref4.macroState,
|
|
123
|
-
placeholderTextState = _ref4.placeholderTextState,
|
|
124
119
|
featureFlags = _ref4.featureFlags;
|
|
125
120
|
var buttons = toolbarSizeToButtons(toolbarSize);
|
|
126
|
-
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead']),
|
|
121
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead', 'placeholderText']),
|
|
127
122
|
dateState = _useSharedPluginState.dateState,
|
|
128
123
|
hyperlinkState = _useSharedPluginState.hyperlinkState,
|
|
129
124
|
imageUploadState = _useSharedPluginState.imageUploadState,
|
|
@@ -131,7 +126,8 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
131
126
|
emojiState = _useSharedPluginState.emojiState,
|
|
132
127
|
blockTypeState = _useSharedPluginState.blockTypeState,
|
|
133
128
|
mediaState = _useSharedPluginState.mediaState,
|
|
134
|
-
typeAheadState = _useSharedPluginState.typeAheadState
|
|
129
|
+
typeAheadState = _useSharedPluginState.typeAheadState,
|
|
130
|
+
placeholderTextState = _useSharedPluginState.placeholderTextState;
|
|
135
131
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
136
132
|
pluginInjectionApi: pluginInjectionApi,
|
|
137
133
|
buttons: buttons,
|
|
@@ -20,7 +20,6 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
20
20
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
21
21
|
import { separatorStyles, buttonGroupStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
22
22
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
23
|
-
import { showPlaceholderFloatingToolbar } from '../../../placeholder-text/actions';
|
|
24
23
|
import { insertTaskDecisionCommand } from '../../../tasks-and-decisions/commands';
|
|
25
24
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
26
25
|
import { messages } from './messages';
|
|
@@ -203,29 +202,32 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
203
202
|
return true;
|
|
204
203
|
});
|
|
205
204
|
_defineProperty(_assertThisInitialized(_this), "createPlaceholderText", function () {
|
|
206
|
-
var
|
|
207
|
-
|
|
205
|
+
var _pluginInjectionApi$p;
|
|
206
|
+
var _this$props3 = _this.props,
|
|
207
|
+
editorView = _this$props3.editorView,
|
|
208
|
+
pluginInjectionApi = _this$props3.pluginInjectionApi;
|
|
209
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$p = pluginInjectionApi.placeholderText) === null || _pluginInjectionApi$p === void 0 || _pluginInjectionApi$p.actions.showPlaceholderFloatingToolbar(editorView.state, editorView.dispatch);
|
|
208
210
|
return true;
|
|
209
211
|
});
|
|
210
212
|
_defineProperty(_assertThisInitialized(_this), "insertLayoutColumns", function (inputMethod) {
|
|
211
213
|
var _pluginInjectionApi$l;
|
|
212
|
-
var _this$
|
|
213
|
-
editorView = _this$
|
|
214
|
-
pluginInjectionApi = _this$
|
|
214
|
+
var _this$props4 = _this.props,
|
|
215
|
+
editorView = _this$props4.editorView,
|
|
216
|
+
pluginInjectionApi = _this$props4.pluginInjectionApi;
|
|
215
217
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$l = pluginInjectionApi.layout) === null || _pluginInjectionApi$l === void 0 || _pluginInjectionApi$l.actions.insertLayoutColumns(inputMethod)(editorView.state, editorView.dispatch);
|
|
216
218
|
return true;
|
|
217
219
|
});
|
|
218
220
|
_defineProperty(_assertThisInitialized(_this), "createStatus", function (inputMethod) {
|
|
219
221
|
var _pluginInjectionApi$s, _pluginInjectionApi$s2;
|
|
220
|
-
var _this$
|
|
221
|
-
pluginInjectionApi = _this$
|
|
222
|
-
editorView = _this$
|
|
222
|
+
var _this$props5 = _this.props,
|
|
223
|
+
pluginInjectionApi = _this$props5.pluginInjectionApi,
|
|
224
|
+
editorView = _this$props5.editorView;
|
|
223
225
|
return (_pluginInjectionApi$s = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$s2 = pluginInjectionApi.status) === null || _pluginInjectionApi$s2 === void 0 || (_pluginInjectionApi$s2 = _pluginInjectionApi$s2.actions) === null || _pluginInjectionApi$s2 === void 0 ? void 0 : _pluginInjectionApi$s2.updateStatus(inputMethod)(editorView.state, editorView.dispatch)) !== null && _pluginInjectionApi$s !== void 0 ? _pluginInjectionApi$s : false;
|
|
224
226
|
});
|
|
225
227
|
_defineProperty(_assertThisInitialized(_this), "openMediaPicker", function (inputMethod) {
|
|
226
|
-
var _this$
|
|
227
|
-
onShowMediaPicker = _this$
|
|
228
|
-
dispatchAnalyticsEvent = _this$
|
|
228
|
+
var _this$props6 = _this.props,
|
|
229
|
+
onShowMediaPicker = _this$props6.onShowMediaPicker,
|
|
230
|
+
dispatchAnalyticsEvent = _this$props6.dispatchAnalyticsEvent;
|
|
229
231
|
if (onShowMediaPicker) {
|
|
230
232
|
onShowMediaPicker();
|
|
231
233
|
if (dispatchAnalyticsEvent) {
|
|
@@ -255,27 +257,27 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
255
257
|
});
|
|
256
258
|
_defineProperty(_assertThisInitialized(_this), "insertHorizontalRule", function (inputMethod) {
|
|
257
259
|
var _pluginInjectionApi$r, _pluginInjectionApi$r2;
|
|
258
|
-
var _this$props6 = _this.props,
|
|
259
|
-
_this$props6$editorVi = _this$props6.editorView,
|
|
260
|
-
state = _this$props6$editorVi.state,
|
|
261
|
-
dispatch = _this$props6$editorVi.dispatch,
|
|
262
|
-
pluginInjectionApi = _this$props6.pluginInjectionApi;
|
|
263
|
-
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
264
|
-
});
|
|
265
|
-
_defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
|
|
266
|
-
var _pluginInjectionApi$e, _pluginInjectionApi$e2;
|
|
267
260
|
var _this$props7 = _this.props,
|
|
268
261
|
_this$props7$editorVi = _this$props7.editorView,
|
|
269
262
|
state = _this$props7$editorVi.state,
|
|
270
263
|
dispatch = _this$props7$editorVi.dispatch,
|
|
271
264
|
pluginInjectionApi = _this$props7.pluginInjectionApi;
|
|
265
|
+
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
266
|
+
});
|
|
267
|
+
_defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
|
|
268
|
+
var _pluginInjectionApi$e, _pluginInjectionApi$e2;
|
|
269
|
+
var _this$props8 = _this.props,
|
|
270
|
+
_this$props8$editorVi = _this$props8.editorView,
|
|
271
|
+
state = _this$props8$editorVi.state,
|
|
272
|
+
dispatch = _this$props8$editorVi.dispatch,
|
|
273
|
+
pluginInjectionApi = _this$props8.pluginInjectionApi;
|
|
272
274
|
return (_pluginInjectionApi$e = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e2 = pluginInjectionApi.expand) === null || _pluginInjectionApi$e2 === void 0 ? void 0 : _pluginInjectionApi$e2.actions.insertExpand(state, dispatch)) !== null && _pluginInjectionApi$e !== void 0 ? _pluginInjectionApi$e : false;
|
|
273
275
|
});
|
|
274
276
|
_defineProperty(_assertThisInitialized(_this), "insertBlockType", function (itemName) {
|
|
275
277
|
return function () {
|
|
276
|
-
var _this$
|
|
277
|
-
editorView = _this$
|
|
278
|
-
onInsertBlockType = _this$
|
|
278
|
+
var _this$props9 = _this.props,
|
|
279
|
+
editorView = _this$props9.editorView,
|
|
280
|
+
onInsertBlockType = _this$props9.onInsertBlockType;
|
|
279
281
|
var state = editorView.state,
|
|
280
282
|
dispatch = editorView.dispatch;
|
|
281
283
|
onInsertBlockType(itemName)(state, dispatch);
|
|
@@ -299,11 +301,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
299
301
|
var _this$props$pluginInj;
|
|
300
302
|
var item = _ref2.item,
|
|
301
303
|
inputMethod = _ref2.inputMethod;
|
|
302
|
-
var _this$
|
|
303
|
-
editorView = _this$
|
|
304
|
-
editorActions = _this$
|
|
305
|
-
handleImageUpload = _this$
|
|
306
|
-
expandEnabled = _this$
|
|
304
|
+
var _this$props10 = _this.props,
|
|
305
|
+
editorView = _this$props10.editorView,
|
|
306
|
+
editorActions = _this$props10.editorActions,
|
|
307
|
+
handleImageUpload = _this$props10.handleImageUpload,
|
|
308
|
+
expandEnabled = _this$props10.expandEnabled;
|
|
307
309
|
|
|
308
310
|
// need to do this before inserting nodes so scrollIntoView works properly
|
|
309
311
|
if (!editorView.hasFocus()) {
|
|
@@ -419,12 +421,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
419
421
|
key: "renderPopup",
|
|
420
422
|
value: function renderPopup() {
|
|
421
423
|
var emojiPickerOpen = this.state.emojiPickerOpen;
|
|
422
|
-
var _this$
|
|
423
|
-
popupsMountPoint = _this$
|
|
424
|
-
popupsBoundariesElement = _this$
|
|
425
|
-
popupsScrollableElement = _this$
|
|
426
|
-
emojiProvider = _this$
|
|
427
|
-
replacePlusMenuWithElementBrowser = _this$
|
|
424
|
+
var _this$props11 = this.props,
|
|
425
|
+
popupsMountPoint = _this$props11.popupsMountPoint,
|
|
426
|
+
popupsBoundariesElement = _this$props11.popupsBoundariesElement,
|
|
427
|
+
popupsScrollableElement = _this$props11.popupsScrollableElement,
|
|
428
|
+
emojiProvider = _this$props11.emojiProvider,
|
|
429
|
+
replacePlusMenuWithElementBrowser = _this$props11.replacePlusMenuWithElementBrowser;
|
|
428
430
|
var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
|
|
429
431
|
var name = _ref4.value.name;
|
|
430
432
|
return name === 'emoji';
|
|
@@ -461,9 +463,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
461
463
|
buttons = _this$state.buttons,
|
|
462
464
|
dropdownItems = _this$state.dropdownItems,
|
|
463
465
|
emojiPickerOpen = _this$state.emojiPickerOpen;
|
|
464
|
-
var _this$
|
|
465
|
-
isDisabled = _this$
|
|
466
|
-
isReducedSpacing = _this$
|
|
466
|
+
var _this$props12 = this.props,
|
|
467
|
+
isDisabled = _this$props12.isDisabled,
|
|
468
|
+
isReducedSpacing = _this$props12.isReducedSpacing;
|
|
467
469
|
if (buttons.length === 0 && dropdownItems.length === 0) {
|
|
468
470
|
return null;
|
|
469
471
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { removeParentNodeOfType, findSelectedNodeOfType, removeSelectedNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
4
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID,
|
|
8
|
-
import { findPanel } from './utils';
|
|
9
|
-
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
6
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
7
|
+
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
|
|
11
8
|
import { wrapSelectionIn } from '@atlaskit/editor-common/utils';
|
|
9
|
+
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
|
+
import { findParentNodeOfType, findSelectedNodeOfType, removeParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
11
|
+
import { findPanel } from './utils';
|
|
12
12
|
export var removePanel = function removePanel(editorAnalyticsAPI) {
|
|
13
13
|
return function (state, dispatch) {
|
|
14
14
|
var nodes = state.schema.nodes,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { panel, PanelType } from '@atlaskit/adf-schema';
|
|
3
|
-
import {
|
|
4
|
-
import { getToolbarConfig } from './toolbar';
|
|
5
|
-
import keymap from './pm-plugins/keymaps';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import { IconPanel, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanelError } from '@atlaskit/editor-common/quick-insert';
|
|
8
|
-
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { IconPanel, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning } from '@atlaskit/editor-common/quick-insert';
|
|
10
6
|
import { IconCustomPanel } from '@atlaskit/editor-common/quick-insert';
|
|
7
|
+
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
11
8
|
import { T50 } from '@atlaskit/theme/colors';
|
|
12
9
|
import { insertPanelWithAnalytics } from './actions';
|
|
10
|
+
import keymap from './pm-plugins/keymaps';
|
|
11
|
+
import { createPlugin } from './pm-plugins/main';
|
|
12
|
+
import { getToolbarConfig } from './toolbar';
|
|
13
13
|
var panelPlugin = function panelPlugin(_ref) {
|
|
14
14
|
var _ref$config = _ref.config,
|
|
15
15
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -2,14 +2,14 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
|
-
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import TipIcon from '@atlaskit/icon/glyph/editor/hint';
|
|
7
5
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
8
|
-
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
9
6
|
import { Emoji } from '@atlaskit/editor-common/emoji';
|
|
10
|
-
import {
|
|
7
|
+
import { PanelErrorIcon, PanelInfoIcon, PanelNoteIcon, PanelSuccessIcon, PanelWarningIcon } from '@atlaskit/editor-common/icons';
|
|
8
|
+
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
9
|
+
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
11
10
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
12
|
-
import
|
|
11
|
+
import TipIcon from '@atlaskit/icon/glyph/editor/hint';
|
|
12
|
+
import { panelAttrsToDom } from '../utils';
|
|
13
13
|
export var panelIcons = {
|
|
14
14
|
info: PanelInfoIcon,
|
|
15
15
|
success: PanelSuccessIcon,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
1
2
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
|
-
import {
|
|
3
|
-
import { isEmptyNode } from '../../../utils';
|
|
3
|
+
import { findParentNodeOfType, hasParentNodeOfType, setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
function findParentNode(selection, nodeType) {
|
|
5
5
|
var parentPosition = findParentNodeOfType(nodeType)(selection);
|
|
6
6
|
if (parentPosition) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
1
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
3
4
|
import { getPanelNodeView } from '../nodeviews/panel';
|
|
4
5
|
import { pluginKey } from '../types';
|
|
5
|
-
import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
6
6
|
export var createPlugin = function createPlugin(dispatch, providerFactory, pluginOptions) {
|
|
7
7
|
var _pluginOptions$useLon = pluginOptions.useLongPressSelection,
|
|
8
8
|
useLongPressSelection = _pluginOptions$useLon === void 0 ? false : _pluginOptions$useLon;
|