@atlaskit/editor-core 151.2.0 → 152.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 +108 -0
- package/dist/cjs/create-editor/ReactEditorView.js +22 -8
- package/dist/cjs/create-editor/create-plugins-list.js +25 -9
- package/dist/cjs/labs/next/presets/cxhtml.js +1 -2
- package/dist/cjs/nodeviews/ReactNodeView.js +2 -2
- package/dist/cjs/nodeviews/SelectionBasedNodeView.js +6 -0
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/annotation/utils.js +19 -8
- package/dist/cjs/plugins/avatar-group/index.js +2 -1
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/cjs/plugins/before-primaryToolbar/index.js +26 -0
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +28 -0
- package/dist/cjs/plugins/extension/extension-api.js +10 -2
- package/dist/cjs/plugins/extension/ui/styles.js +1 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +172 -0
- package/dist/cjs/plugins/find-replace/index.js +14 -137
- package/dist/cjs/plugins/find-replace/ui/Find.js +16 -9
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +9 -2
- package/dist/cjs/plugins/find-replace/ui/Replace.js +11 -3
- package/dist/cjs/plugins/find-replace/ui/styles.js +44 -35
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/cjs/plugins/fragment/index.js +34 -0
- package/dist/cjs/plugins/fragment/plugin-key.js +11 -0
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/plugins/index.js +16 -0
- package/dist/cjs/plugins/list/actions/conversions.js +39 -71
- package/dist/cjs/plugins/list/transforms.js +7 -1
- package/dist/cjs/plugins/media/index.js +2 -3
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +3 -1
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +12 -5
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +6 -4
- package/dist/cjs/plugins/media/nodeviews/styles.js +6 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +49 -15
- package/dist/cjs/plugins/media/toolbar/commands.js +59 -0
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +7 -2
- package/dist/cjs/plugins/media/toolbar/index.js +90 -3
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/cjs/plugins/media/utils/media-common.js +1 -1
- package/dist/cjs/plugins/media/utils/media-files.js +5 -1
- package/dist/cjs/plugins/panel/actions.js +2 -2
- package/dist/cjs/plugins/panel/index.js +3 -3
- package/dist/cjs/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/cjs/plugins/panel/toolbar.js +10 -5
- package/dist/cjs/plugins/panel/utils.js +15 -0
- package/dist/cjs/plugins/rank.js +3 -2
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +49 -1
- package/dist/cjs/plugins/status/ui/statusPicker.js +4 -2
- package/dist/cjs/plugins/table/commands/insert.js +1 -0
- package/dist/cjs/plugins/table/index.js +3 -2
- package/dist/cjs/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -3
- package/dist/cjs/plugins/table/pm-plugins/main.js +26 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/cjs/plugins/table/transforms/column-width.js +14 -5
- package/dist/cjs/plugins/table/transforms/fix-tables.js +43 -6
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/cjs/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +1 -1
- package/dist/cjs/plugins/table/ui/messages.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/cjs/plugins/text-formatting/index.js +2 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +77 -26
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +32 -9
- package/dist/cjs/ui/ColorPalette/Color/index.js +8 -18
- package/dist/cjs/ui/ColorPalette/index.js +7 -4
- package/dist/cjs/ui/ColorPickerButton/index.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +114 -61
- package/dist/cjs/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/cjs/ui/ConfigPanel/transformers.js +490 -248
- package/dist/cjs/ui/ConfigPanel/utils.js +2 -10
- package/dist/cjs/ui/DropdownMenu/index.js +3 -1
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/cjs/ui/Resizer/index.js +9 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +19 -8
- package/dist/es2019/create-editor/create-plugins-list.js +26 -10
- package/dist/es2019/labs/next/presets/cxhtml.js +1 -2
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -1
- package/dist/es2019/nodeviews/SelectionBasedNodeView.js +11 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/annotation/utils.js +18 -7
- package/dist/es2019/plugins/avatar-group/index.js +2 -1
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
- package/dist/es2019/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/es2019/plugins/extension/extension-api.js +9 -2
- package/dist/es2019/plugins/extension/ui/styles.js +6 -0
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +152 -0
- package/dist/es2019/plugins/find-replace/index.js +15 -128
- package/dist/es2019/plugins/find-replace/ui/Find.js +18 -10
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +11 -3
- package/dist/es2019/plugins/find-replace/ui/Replace.js +12 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +37 -47
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/es2019/plugins/fragment/index.js +22 -0
- package/dist/es2019/plugins/fragment/plugin-key.js +2 -0
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/es2019/plugins/index.js +2 -0
- package/dist/es2019/plugins/list/actions/conversions.js +38 -69
- package/dist/es2019/plugins/list/transforms.js +5 -1
- package/dist/es2019/plugins/media/index.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +8 -4
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/es2019/plugins/media/nodeviews/styles.js +2 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +32 -17
- package/dist/es2019/plugins/media/toolbar/commands.js +47 -0
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/es2019/plugins/media/toolbar/index.js +90 -3
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +7 -1
- package/dist/es2019/plugins/media/utils/media-common.js +1 -1
- package/dist/es2019/plugins/media/utils/media-files.js +6 -1
- package/dist/es2019/plugins/panel/actions.js +2 -2
- package/dist/es2019/plugins/panel/index.js +5 -5
- package/dist/es2019/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/es2019/plugins/panel/toolbar.js +10 -5
- package/dist/es2019/plugins/panel/utils.js +8 -1
- package/dist/es2019/plugins/rank.js +3 -2
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +48 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +4 -2
- package/dist/es2019/plugins/table/commands/insert.js +1 -2
- package/dist/es2019/plugins/table/index.js +2 -1
- package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +25 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/es2019/plugins/table/transforms/column-width.js +13 -3
- package/dist/es2019/plugins/table/transforms/fix-tables.js +43 -5
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/es2019/plugins/table/ui/common-styles.css.js +5 -1
- package/dist/es2019/plugins/table/ui/consts.js +2 -2
- package/dist/es2019/plugins/table/ui/messages.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/es2019/plugins/text-formatting/index.js +3 -2
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +60 -27
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +51 -7
- package/dist/es2019/ui/ColorPalette/Color/index.js +9 -18
- package/dist/es2019/ui/ColorPalette/index.js +7 -4
- package/dist/es2019/ui/ColorPickerButton/index.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +101 -49
- package/dist/es2019/ui/ConfigPanel/FormContent.js +35 -26
- package/dist/es2019/ui/ConfigPanel/transformers.js +243 -72
- package/dist/es2019/ui/ConfigPanel/utils.js +1 -2
- package/dist/es2019/ui/Dropdown/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +7 -3
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/es2019/ui/Resizer/index.js +9 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +22 -8
- package/dist/esm/create-editor/create-plugins-list.js +26 -10
- package/dist/esm/labs/next/presets/cxhtml.js +1 -2
- package/dist/esm/nodeviews/ReactNodeView.js +2 -2
- package/dist/esm/nodeviews/SelectionBasedNodeView.js +7 -0
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/annotation/utils.js +18 -7
- package/dist/esm/plugins/avatar-group/index.js +2 -1
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/esm/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/esm/plugins/extension/extension-api.js +9 -2
- package/dist/esm/plugins/extension/ui/styles.js +1 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +155 -0
- package/dist/esm/plugins/find-replace/index.js +14 -131
- package/dist/esm/plugins/find-replace/ui/Find.js +17 -10
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +10 -3
- package/dist/esm/plugins/find-replace/ui/Replace.js +11 -4
- package/dist/esm/plugins/find-replace/ui/styles.js +39 -18
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +9 -4
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/esm/plugins/fragment/index.js +22 -0
- package/dist/esm/plugins/fragment/plugin-key.js +2 -0
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/esm/plugins/index.js +2 -0
- package/dist/esm/plugins/list/actions/conversions.js +38 -71
- package/dist/esm/plugins/list/transforms.js +7 -1
- package/dist/esm/plugins/media/index.js +2 -3
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +11 -6
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/esm/plugins/media/nodeviews/styles.js +2 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +47 -16
- package/dist/esm/plugins/media/toolbar/commands.js +45 -0
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/esm/plugins/media/toolbar/index.js +88 -3
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/esm/plugins/media/utils/media-common.js +1 -1
- package/dist/esm/plugins/media/utils/media-files.js +6 -1
- package/dist/esm/plugins/panel/actions.js +2 -2
- package/dist/esm/plugins/panel/index.js +5 -5
- package/dist/esm/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/esm/plugins/panel/toolbar.js +9 -4
- package/dist/esm/plugins/panel/utils.js +13 -0
- package/dist/esm/plugins/rank.js +3 -2
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +50 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +4 -2
- package/dist/esm/plugins/table/commands/insert.js +1 -2
- package/dist/esm/plugins/table/index.js +3 -2
- package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +27 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/esm/plugins/table/transforms/column-width.js +13 -3
- package/dist/esm/plugins/table/transforms/fix-tables.js +42 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/esm/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +2 -2
- package/dist/esm/plugins/table/ui/messages.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/esm/plugins/text-formatting/index.js +3 -2
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +67 -27
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +20 -7
- package/dist/esm/ui/ColorPalette/Color/index.js +9 -16
- package/dist/esm/ui/ColorPalette/index.js +7 -4
- package/dist/esm/ui/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +113 -62
- package/dist/esm/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/esm/ui/ConfigPanel/transformers.js +488 -248
- package/dist/esm/ui/ConfigPanel/utils.js +1 -6
- package/dist/esm/ui/Dropdown/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +7 -3
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/esm/ui/Resizer/index.js +9 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -1
- package/dist/types/nodeviews/SelectionBasedNodeView.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +7 -1
- package/dist/types/plugins/annotation/utils.d.ts +1 -1
- package/dist/types/plugins/avatar-group/index.d.ts +1 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -0
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +5 -0
- package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +5 -0
- package/dist/types/plugins/code-block/types.d.ts +1 -1
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +15 -0
- package/dist/types/plugins/find-replace/index.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/Find.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/Replace.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/styles.d.ts +5 -14
- package/dist/types/plugins/floating-toolbar/ui/EmojiPickerButton.d.ts +1 -1
- package/dist/types/plugins/fragment/index.d.ts +5 -0
- package/dist/types/plugins/fragment/plugin-key.d.ts +2 -0
- package/dist/types/plugins/index.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +3 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/styles.d.ts +2 -0
- package/dist/types/plugins/media/toolbar/commands.d.ts +3 -0
- package/dist/types/plugins/media/toolbar/filePreviewItem.d.ts +2 -0
- package/dist/types/plugins/media/types.d.ts +0 -1
- package/dist/types/plugins/panel/actions.d.ts +1 -1
- package/dist/types/plugins/panel/types.d.ts +8 -2
- package/dist/types/plugins/quick-insert/index.d.ts +2 -1
- package/dist/types/plugins/table/commands/insert.d.ts +3 -0
- package/dist/types/plugins/table/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -0
- package/dist/types/plugins/table/transforms/column-width.d.ts +4 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +3 -2
- package/dist/types/plugins/table/types.d.ts +8 -0
- package/dist/types/plugins/table/ui/consts.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +11 -1
- package/dist/types/types/feature-flags.d.ts +13 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +10 -1
- package/dist/types/ui/ColorPalette/Color/index.d.ts +8 -5
- package/dist/types/ui/ColorPalette/index.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/transformers.d.ts +7 -1
- package/dist/types/ui/ConfigPanel/utils.d.ts +0 -1
- package/dist/types/ui/Resizer/index.d.ts +1 -0
- package/package.json +33 -29
- package/dist/cjs/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -38
- package/dist/es2019/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/esm/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/types/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.d.ts +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _types = require("./types");
|
|
13
|
+
|
|
14
|
+
var _WithPluginState = _interopRequireDefault(require("../../ui/WithPluginState"));
|
|
15
|
+
|
|
16
|
+
var _commandsWithAnalytics = require("./commands-with-analytics");
|
|
17
|
+
|
|
18
|
+
var _commands = require("./commands");
|
|
19
|
+
|
|
20
|
+
var _FindReplaceToolbarButton = _interopRequireDefault(require("./ui/FindReplaceToolbarButton"));
|
|
21
|
+
|
|
22
|
+
var _analytics = require("../analytics");
|
|
23
|
+
|
|
24
|
+
var _featureFlagsContext = require("../feature-flags-context");
|
|
25
|
+
|
|
26
|
+
var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithState(props) {
|
|
27
|
+
var popupsBoundariesElement = props.popupsBoundariesElement,
|
|
28
|
+
popupsMountPoint = props.popupsMountPoint,
|
|
29
|
+
popupsScrollableElement = props.popupsScrollableElement,
|
|
30
|
+
isToolbarReducedSpacing = props.isToolbarReducedSpacing,
|
|
31
|
+
editorView = props.editorView,
|
|
32
|
+
containerElement = props.containerElement,
|
|
33
|
+
dispatchAnalyticsEvent = props.dispatchAnalyticsEvent;
|
|
34
|
+
|
|
35
|
+
if (!editorView) {
|
|
36
|
+
return null;
|
|
37
|
+
} // we need the editor to be in focus for scrollIntoView() to work
|
|
38
|
+
// so we focus it while we run the command, then put focus back into
|
|
39
|
+
// whatever element was previously focused in find replace component
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var runWithEditorFocused = function runWithEditorFocused(fn) {
|
|
43
|
+
var activeElement = document.activeElement;
|
|
44
|
+
editorView.focus();
|
|
45
|
+
fn();
|
|
46
|
+
activeElement === null || activeElement === void 0 ? void 0 : activeElement.focus();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var dispatchCommand = function dispatchCommand(cmd) {
|
|
50
|
+
var state = editorView.state,
|
|
51
|
+
dispatch = editorView.dispatch;
|
|
52
|
+
cmd(state, dispatch);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var handleActivate = function handleActivate() {
|
|
56
|
+
runWithEditorFocused(function () {
|
|
57
|
+
return dispatchCommand((0, _commandsWithAnalytics.activateWithAnalytics)({
|
|
58
|
+
triggerMethod: _analytics.TRIGGER_METHOD.TOOLBAR
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var handleFind = function handleFind(keyword) {
|
|
64
|
+
runWithEditorFocused(function () {
|
|
65
|
+
return dispatchCommand((0, _commandsWithAnalytics.findWithAnalytics)({
|
|
66
|
+
editorView: editorView,
|
|
67
|
+
containerElement: containerElement,
|
|
68
|
+
keyword: keyword
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var handleFindNext = function handleFindNext(_ref) {
|
|
74
|
+
var triggerMethod = _ref.triggerMethod;
|
|
75
|
+
runWithEditorFocused(function () {
|
|
76
|
+
return dispatchCommand((0, _commandsWithAnalytics.findNextWithAnalytics)({
|
|
77
|
+
triggerMethod: triggerMethod
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var handleFindPrev = function handleFindPrev(_ref2) {
|
|
83
|
+
var triggerMethod = _ref2.triggerMethod;
|
|
84
|
+
runWithEditorFocused(function () {
|
|
85
|
+
return dispatchCommand((0, _commandsWithAnalytics.findPrevWithAnalytics)({
|
|
86
|
+
triggerMethod: triggerMethod
|
|
87
|
+
}));
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var handleReplace = function handleReplace(_ref3) {
|
|
92
|
+
var triggerMethod = _ref3.triggerMethod,
|
|
93
|
+
replaceText = _ref3.replaceText;
|
|
94
|
+
runWithEditorFocused(function () {
|
|
95
|
+
return dispatchCommand((0, _commandsWithAnalytics.replaceWithAnalytics)({
|
|
96
|
+
triggerMethod: triggerMethod,
|
|
97
|
+
replaceText: replaceText
|
|
98
|
+
}));
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
var handleReplaceAll = function handleReplaceAll(_ref4) {
|
|
103
|
+
var replaceText = _ref4.replaceText;
|
|
104
|
+
runWithEditorFocused(function () {
|
|
105
|
+
return dispatchCommand((0, _commandsWithAnalytics.replaceAllWithAnalytics)({
|
|
106
|
+
replaceText: replaceText
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var handleFindBlur = function handleFindBlur() {
|
|
112
|
+
dispatchCommand((0, _commands.blur)());
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
var handleCancel = function handleCancel(_ref5) {
|
|
116
|
+
var triggerMethod = _ref5.triggerMethod;
|
|
117
|
+
dispatchCommand((0, _commandsWithAnalytics.cancelSearchWithAnalytics)({
|
|
118
|
+
triggerMethod: triggerMethod
|
|
119
|
+
}));
|
|
120
|
+
editorView.focus();
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var handleToggleMatchCase = function handleToggleMatchCase() {
|
|
124
|
+
dispatchCommand((0, _commands.toggleMatchCase)());
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
var _getFeatureFlags = (0, _featureFlagsContext.getFeatureFlags)(editorView.state),
|
|
128
|
+
findReplaceMatchCase = _getFeatureFlags.findReplaceMatchCase;
|
|
129
|
+
|
|
130
|
+
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
131
|
+
debounce: false,
|
|
132
|
+
plugins: {
|
|
133
|
+
findReplaceState: _types.findReplacePluginKey
|
|
134
|
+
},
|
|
135
|
+
render: function render(_ref6) {
|
|
136
|
+
var findReplaceState = _ref6.findReplaceState;
|
|
137
|
+
|
|
138
|
+
if (!findReplaceState) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement(_FindReplaceToolbarButton.default, {
|
|
143
|
+
allowMatchCase: findReplaceMatchCase,
|
|
144
|
+
shouldMatchCase: findReplaceState.shouldMatchCase,
|
|
145
|
+
onToggleMatchCase: handleToggleMatchCase,
|
|
146
|
+
isActive: findReplaceState.isActive,
|
|
147
|
+
findText: findReplaceState.findText,
|
|
148
|
+
index: findReplaceState.index,
|
|
149
|
+
numMatches: findReplaceState.matches.length,
|
|
150
|
+
replaceText: findReplaceState.replaceText,
|
|
151
|
+
shouldFocus: findReplaceState.shouldFocus,
|
|
152
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
153
|
+
popupsMountPoint: popupsMountPoint,
|
|
154
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
155
|
+
isReducedSpacing: !!isToolbarReducedSpacing,
|
|
156
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
157
|
+
onFindBlur: handleFindBlur,
|
|
158
|
+
onCancel: handleCancel,
|
|
159
|
+
onActivate: handleActivate,
|
|
160
|
+
onFind: handleFind,
|
|
161
|
+
onFindNext: handleFindNext,
|
|
162
|
+
onFindPrev: handleFindPrev,
|
|
163
|
+
onReplace: handleReplace,
|
|
164
|
+
onReplaceAll: handleReplaceAll,
|
|
165
|
+
takeFullWidth: !!props.takeFullWidth
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
var _default = FindReplaceToolbarButtonWithState;
|
|
172
|
+
exports.default = _default;
|
|
@@ -11,21 +11,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _plugin = require("./plugin");
|
|
13
13
|
|
|
14
|
-
var _types = require("./types");
|
|
15
|
-
|
|
16
14
|
var _keymap = _interopRequireDefault(require("./keymap"));
|
|
17
15
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _commandsWithAnalytics = require("./commands-with-analytics");
|
|
21
|
-
|
|
22
|
-
var _commands = require("./commands");
|
|
23
|
-
|
|
24
|
-
var _FindReplaceToolbarButton = _interopRequireDefault(require("./ui/FindReplaceToolbarButton"));
|
|
25
|
-
|
|
26
|
-
var _analytics = require("../analytics");
|
|
27
|
-
|
|
28
|
-
var _featureFlagsContext = require("../feature-flags-context");
|
|
16
|
+
var _FindReplaceToolbarButtonWithState = _interopRequireDefault(require("./FindReplaceToolbarButtonWithState"));
|
|
29
17
|
|
|
30
18
|
var findReplacePlugin = function findReplacePlugin(props) {
|
|
31
19
|
return {
|
|
@@ -53,131 +41,20 @@ var findReplacePlugin = function findReplacePlugin(props) {
|
|
|
53
41
|
containerElement = _ref2.containerElement,
|
|
54
42
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent;
|
|
55
43
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
dispatch = editorView.dispatch;
|
|
69
|
-
cmd(state, dispatch);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
var handleActivate = function handleActivate() {
|
|
73
|
-
runWithEditorFocused(function () {
|
|
74
|
-
return dispatchCommand((0, _commandsWithAnalytics.activateWithAnalytics)({
|
|
75
|
-
triggerMethod: _analytics.TRIGGER_METHOD.TOOLBAR
|
|
76
|
-
}));
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var handleFind = function handleFind(keyword) {
|
|
81
|
-
runWithEditorFocused(function () {
|
|
82
|
-
return dispatchCommand((0, _commandsWithAnalytics.findWithAnalytics)({
|
|
83
|
-
editorView: editorView,
|
|
84
|
-
containerElement: containerElement,
|
|
85
|
-
keyword: keyword
|
|
86
|
-
}));
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var handleFindNext = function handleFindNext(_ref3) {
|
|
91
|
-
var triggerMethod = _ref3.triggerMethod;
|
|
92
|
-
runWithEditorFocused(function () {
|
|
93
|
-
return dispatchCommand((0, _commandsWithAnalytics.findNextWithAnalytics)({
|
|
94
|
-
triggerMethod: triggerMethod
|
|
95
|
-
}));
|
|
44
|
+
if (props.twoLineEditorToolbar) {
|
|
45
|
+
return null;
|
|
46
|
+
} else {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_FindReplaceToolbarButtonWithState.default, {
|
|
48
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
49
|
+
popupsMountPoint: popupsMountPoint,
|
|
50
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
51
|
+
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
52
|
+
editorView: editorView,
|
|
53
|
+
containerElement: containerElement,
|
|
54
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
55
|
+
takeFullWidth: props.takeFullWidth
|
|
96
56
|
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var handleFindPrev = function handleFindPrev(_ref4) {
|
|
100
|
-
var triggerMethod = _ref4.triggerMethod;
|
|
101
|
-
runWithEditorFocused(function () {
|
|
102
|
-
return dispatchCommand((0, _commandsWithAnalytics.findPrevWithAnalytics)({
|
|
103
|
-
triggerMethod: triggerMethod
|
|
104
|
-
}));
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
var handleReplace = function handleReplace(_ref5) {
|
|
109
|
-
var triggerMethod = _ref5.triggerMethod,
|
|
110
|
-
replaceText = _ref5.replaceText;
|
|
111
|
-
runWithEditorFocused(function () {
|
|
112
|
-
return dispatchCommand((0, _commandsWithAnalytics.replaceWithAnalytics)({
|
|
113
|
-
triggerMethod: triggerMethod,
|
|
114
|
-
replaceText: replaceText
|
|
115
|
-
}));
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
var handleReplaceAll = function handleReplaceAll(_ref6) {
|
|
120
|
-
var replaceText = _ref6.replaceText;
|
|
121
|
-
runWithEditorFocused(function () {
|
|
122
|
-
return dispatchCommand((0, _commandsWithAnalytics.replaceAllWithAnalytics)({
|
|
123
|
-
replaceText: replaceText
|
|
124
|
-
}));
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
var handleFindBlur = function handleFindBlur() {
|
|
129
|
-
dispatchCommand((0, _commands.blur)());
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
var handleCancel = function handleCancel(_ref7) {
|
|
133
|
-
var triggerMethod = _ref7.triggerMethod;
|
|
134
|
-
dispatchCommand((0, _commandsWithAnalytics.cancelSearchWithAnalytics)({
|
|
135
|
-
triggerMethod: triggerMethod
|
|
136
|
-
}));
|
|
137
|
-
editorView.focus();
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
var handleToggleMatchCase = function handleToggleMatchCase() {
|
|
141
|
-
dispatchCommand((0, _commands.toggleMatchCase)());
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
var _getFeatureFlags = (0, _featureFlagsContext.getFeatureFlags)(editorView.state),
|
|
145
|
-
findReplaceMatchCase = _getFeatureFlags.findReplaceMatchCase;
|
|
146
|
-
|
|
147
|
-
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
148
|
-
debounce: false,
|
|
149
|
-
plugins: {
|
|
150
|
-
findReplaceState: _types.findReplacePluginKey
|
|
151
|
-
},
|
|
152
|
-
render: function render(_ref8) {
|
|
153
|
-
var findReplaceState = _ref8.findReplaceState;
|
|
154
|
-
return /*#__PURE__*/_react.default.createElement(_FindReplaceToolbarButton.default, {
|
|
155
|
-
allowMatchCase: findReplaceMatchCase,
|
|
156
|
-
shouldMatchCase: findReplaceState.shouldMatchCase,
|
|
157
|
-
onToggleMatchCase: handleToggleMatchCase,
|
|
158
|
-
isActive: findReplaceState.isActive,
|
|
159
|
-
findText: findReplaceState.findText,
|
|
160
|
-
index: findReplaceState.index,
|
|
161
|
-
numMatches: findReplaceState.matches.length,
|
|
162
|
-
replaceText: findReplaceState.replaceText,
|
|
163
|
-
shouldFocus: findReplaceState.shouldFocus,
|
|
164
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
165
|
-
popupsMountPoint: popupsMountPoint,
|
|
166
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
167
|
-
isReducedSpacing: isToolbarReducedSpacing,
|
|
168
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
169
|
-
onFindBlur: handleFindBlur,
|
|
170
|
-
onCancel: handleCancel,
|
|
171
|
-
onActivate: handleActivate,
|
|
172
|
-
onFind: handleFind,
|
|
173
|
-
onFindNext: handleFindNext,
|
|
174
|
-
onFindPrev: handleFindPrev,
|
|
175
|
-
onReplace: handleReplace,
|
|
176
|
-
onReplaceAll: handleReplaceAll,
|
|
177
|
-
takeFullWidth: props.takeFullWidth
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
});
|
|
57
|
+
}
|
|
181
58
|
}
|
|
182
59
|
};
|
|
183
60
|
};
|
|
@@ -23,6 +23,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
23
23
|
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
25
|
|
|
26
|
+
var _core = require("@emotion/core");
|
|
27
|
+
|
|
26
28
|
var _reactIntl = require("react-intl");
|
|
27
29
|
|
|
28
30
|
var _close = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/close"));
|
|
@@ -180,16 +182,16 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
180
182
|
_this.findNext = formatMessage(messages.findNext);
|
|
181
183
|
_this.findPrevious = formatMessage(messages.findPrevious);
|
|
182
184
|
_this.matchCase = formatMessage(messages.matchCase);
|
|
183
|
-
_this.matchCaseIcon =
|
|
185
|
+
_this.matchCaseIcon = (0, _core.jsx)(_keyboard.default, {
|
|
184
186
|
label: _this.matchCase
|
|
185
187
|
});
|
|
186
|
-
_this.findNextIcon =
|
|
188
|
+
_this.findNextIcon = (0, _core.jsx)(_chevronDown.default, {
|
|
187
189
|
label: _this.findNext
|
|
188
190
|
});
|
|
189
|
-
_this.findPrevIcon =
|
|
191
|
+
_this.findPrevIcon = (0, _core.jsx)(_chevronUp.default, {
|
|
190
192
|
label: _this.findPrevious
|
|
191
193
|
});
|
|
192
|
-
_this.closeIcon =
|
|
194
|
+
_this.closeIcon = (0, _core.jsx)(_close.default, {
|
|
193
195
|
label: _this.closeFindReplaceDialog
|
|
194
196
|
}); // We locally manage the value of the input inside this component in order to support compositions.
|
|
195
197
|
// This requires some additional work inside componentDidUpdate to ensure we support changes that
|
|
@@ -235,7 +237,9 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
235
237
|
selectedMatchPosition: count.index + 1,
|
|
236
238
|
totalResultsCount: count.total
|
|
237
239
|
});
|
|
238
|
-
return
|
|
240
|
+
return (0, _core.jsx)("div", {
|
|
241
|
+
css: _styles.sectionWrapperStyles
|
|
242
|
+
}, (0, _core.jsx)(_textfield.default, {
|
|
239
243
|
name: "find",
|
|
240
244
|
appearance: "none",
|
|
241
245
|
placeholder: this.find,
|
|
@@ -247,24 +251,27 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
247
251
|
onBlur: this.props.onFindBlur,
|
|
248
252
|
onCompositionStart: this.handleCompositionStart,
|
|
249
253
|
onCompositionEnd: this.handleCompositionEnd
|
|
250
|
-
}), findText &&
|
|
254
|
+
}), findText && (0, _core.jsx)("span", {
|
|
255
|
+
"data-testid": "textfield-count",
|
|
256
|
+
css: _styles.countStyles
|
|
257
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount), allowMatchCase && (0, _core.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
251
258
|
title: this.matchCase,
|
|
252
259
|
icon: this.matchCaseIcon,
|
|
253
260
|
onClick: this.handleMatchCaseClick,
|
|
254
261
|
isPressed: shouldMatchCase
|
|
255
|
-
}),
|
|
262
|
+
}), (0, _core.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
256
263
|
title: this.findNext,
|
|
257
264
|
icon: this.findNextIcon,
|
|
258
265
|
keymapDescription: 'Enter',
|
|
259
266
|
onClick: this.handleFindNextClick,
|
|
260
267
|
disabled: count.total <= 1
|
|
261
|
-
}),
|
|
268
|
+
}), (0, _core.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
262
269
|
title: this.findPrevious,
|
|
263
270
|
icon: this.findPrevIcon,
|
|
264
271
|
keymapDescription: 'Shift Enter',
|
|
265
272
|
onClick: this.handleFindPrevClick,
|
|
266
273
|
disabled: count.total <= 1
|
|
267
|
-
}),
|
|
274
|
+
}), (0, _core.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
268
275
|
title: this.closeFindReplaceDialog,
|
|
269
276
|
icon: this.closeIcon,
|
|
270
277
|
keymapDescription: 'Escape',
|
|
@@ -23,6 +23,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
23
23
|
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
25
|
|
|
26
|
+
var _core = require("@emotion/core");
|
|
27
|
+
|
|
26
28
|
var _Find = _interopRequireDefault(require("./Find"));
|
|
27
29
|
|
|
28
30
|
var _Replace = _interopRequireDefault(require("./Replace"));
|
|
@@ -88,7 +90,9 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
88
90
|
allowMatchCase = _this$props.allowMatchCase,
|
|
89
91
|
shouldMatchCase = _this$props.shouldMatchCase,
|
|
90
92
|
onToggleMatchCase = _this$props.onToggleMatchCase;
|
|
91
|
-
return
|
|
93
|
+
return (0, _core.jsx)("div", {
|
|
94
|
+
css: _styles.wrapperStyles
|
|
95
|
+
}, (0, _core.jsx)(_Find.default, {
|
|
92
96
|
allowMatchCase: allowMatchCase,
|
|
93
97
|
shouldMatchCase: shouldMatchCase,
|
|
94
98
|
onToggleMatchCase: onToggleMatchCase,
|
|
@@ -102,7 +106,10 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
102
106
|
onFindTextfieldRefSet: this.setFindTextfieldRef,
|
|
103
107
|
onCancel: onCancel,
|
|
104
108
|
onArrowDown: this.setFocusToReplace
|
|
105
|
-
}),
|
|
109
|
+
}), (0, _core.jsx)("hr", {
|
|
110
|
+
css: _styles.ruleStyles,
|
|
111
|
+
id: "replace-hr-element"
|
|
112
|
+
}), (0, _core.jsx)(_Replace.default, {
|
|
106
113
|
canReplace: count.total > 0,
|
|
107
114
|
replaceText: replaceText,
|
|
108
115
|
onReplace: onReplace,
|
|
@@ -23,6 +23,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
23
23
|
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
25
|
|
|
26
|
+
var _core = require("@emotion/core");
|
|
27
|
+
|
|
28
|
+
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
29
|
+
|
|
26
30
|
var _reactIntl = require("react-intl");
|
|
27
31
|
|
|
28
32
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
@@ -167,7 +171,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
167
171
|
value: function render() {
|
|
168
172
|
var replaceText = this.state.replaceText;
|
|
169
173
|
var canReplace = this.props.canReplace;
|
|
170
|
-
return
|
|
174
|
+
return (0, _core.jsx)("div", {
|
|
175
|
+
css: _styles.sectionWrapperStyles
|
|
176
|
+
}, (0, _core.jsx)(_textfield.default, {
|
|
171
177
|
name: "replace",
|
|
172
178
|
appearance: "none",
|
|
173
179
|
placeholder: this.replaceWith,
|
|
@@ -178,11 +184,13 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
178
184
|
onKeyDown: this.handleReplaceKeyDown,
|
|
179
185
|
onCompositionStart: this.handleCompositionStart,
|
|
180
186
|
onCompositionEnd: this.handleCompositionEnd
|
|
181
|
-
}),
|
|
187
|
+
}), (0, _core.jsx)(_standardButton.default, {
|
|
188
|
+
css: _styles.replaceSectionButtonStyles,
|
|
182
189
|
testId: this.replace,
|
|
183
190
|
onClick: this.handleReplaceClick,
|
|
184
191
|
isDisabled: !canReplace
|
|
185
|
-
}, this.replace),
|
|
192
|
+
}, this.replace), (0, _core.jsx)(_standardButton.default, {
|
|
193
|
+
css: _styles.replaceSectionButtonStyles,
|
|
186
194
|
testId: this.replaceAll,
|
|
187
195
|
onClick: this.handleReplaceAllClick,
|
|
188
196
|
isDisabled: !canReplace
|
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
exports.countStyles = exports.sectionWrapperStyles = exports.wrapperStyles = exports.ruleStyles = exports.replaceSectionButtonStyles = void 0;
|
|
13
7
|
|
|
14
|
-
var
|
|
8
|
+
var _core = require("@emotion/core");
|
|
15
9
|
|
|
16
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
11
|
|
|
18
|
-
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
19
|
-
|
|
20
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
21
13
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
14
|
+
/** @jsx jsx */
|
|
15
|
+
var replaceSectionButtonStyles = (0, _core.css)({
|
|
16
|
+
marginLeft: '4px'
|
|
17
|
+
});
|
|
18
|
+
exports.replaceSectionButtonStyles = replaceSectionButtonStyles;
|
|
19
|
+
var ruleStyles = (0, _core.css)({
|
|
20
|
+
width: '100%',
|
|
21
|
+
border: 'none',
|
|
22
|
+
backgroundColor: "".concat(_colors.N30A),
|
|
23
|
+
margin: '4px 0px',
|
|
24
|
+
height: '1px',
|
|
25
|
+
borderRadius: '1px'
|
|
26
|
+
});
|
|
27
|
+
exports.ruleStyles = ruleStyles;
|
|
28
|
+
var wrapperStyles = (0, _core.css)({
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'column',
|
|
31
|
+
'> *:not(#replace-hr-element)': {
|
|
32
|
+
margin: '0px 4px'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
exports.wrapperStyles = wrapperStyles;
|
|
36
|
+
var sectionWrapperStyles = (0, _core.css)({
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'column',
|
|
39
|
+
'> *': {
|
|
40
|
+
display: 'inline-flex',
|
|
41
|
+
height: '32px',
|
|
42
|
+
flex: '0 0 auto'
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
exports.sectionWrapperStyles = sectionWrapperStyles;
|
|
46
|
+
var countStyles = (0, _core.css)({
|
|
47
|
+
color: "".concat(_colors.N60),
|
|
48
|
+
fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
|
|
49
|
+
flex: '0 0 auto',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
marginLeft: '4px',
|
|
53
|
+
marginRight: '8px'
|
|
54
|
+
});
|
|
55
|
+
exports.countStyles = countStyles;
|
|
@@ -25,10 +25,15 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
|
25
25
|
|
|
26
26
|
var _EditorEmojiAddIcon = _interopRequireDefault(require("./EditorEmojiAddIcon"));
|
|
27
27
|
|
|
28
|
-
var _templateObject;
|
|
28
|
+
var _templateObject, _templateObject2;
|
|
29
29
|
|
|
30
30
|
// helps adjusts position of popup
|
|
31
|
-
var EmojiPickerButtonWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
|
|
31
|
+
var EmojiPickerButtonWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"]))); // helps to vertically align emoji picker
|
|
32
|
+
// both top and bottom margin should be 2px
|
|
33
|
+
// https://product-fabric.atlassian.net/browse/CETI-148
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
var EmojiPickerWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: -12px;\n margin-top: -4px;\n"])));
|
|
32
37
|
|
|
33
38
|
var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
34
39
|
var buttonRef = _react.default.useRef(null);
|
|
@@ -46,6 +51,7 @@ var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
46
51
|
|
|
47
52
|
var updateEmoji = function updateEmoji(emoji) {
|
|
48
53
|
setIsPopupOpen(false);
|
|
54
|
+
props.editorView && props.editorView.focus();
|
|
49
55
|
props.onChange && props.onChange(emoji);
|
|
50
56
|
};
|
|
51
57
|
|
|
@@ -73,11 +79,11 @@ var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
73
79
|
fitHeight: 350,
|
|
74
80
|
fitWidth: 350,
|
|
75
81
|
offset: [0, 10]
|
|
76
|
-
}, /*#__PURE__*/_react.default.createElement(_editorCommon.WithProviders, {
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement(EmojiPickerWrapper, null, /*#__PURE__*/_react.default.createElement(_editorCommon.WithProviders, {
|
|
77
83
|
providers: ['emojiProvider'],
|
|
78
84
|
providerFactory: props.providerFactory,
|
|
79
85
|
renderNode: renderPicker
|
|
80
|
-
}));
|
|
86
|
+
})));
|
|
81
87
|
};
|
|
82
88
|
|
|
83
89
|
var title = props.title || '';
|
|
@@ -308,7 +308,7 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
308
308
|
if (item.selectType === 'emoji') {
|
|
309
309
|
return /*#__PURE__*/_react.default.createElement(_EmojiPickerButton.EmojiPickerButton, {
|
|
310
310
|
key: idx,
|
|
311
|
-
|
|
311
|
+
editorView: editorView,
|
|
312
312
|
title: item.title,
|
|
313
313
|
providerFactory: providerFactory,
|
|
314
314
|
isSelected: item.selected,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createPlugin = createPlugin;
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
|
|
9
|
+
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
+
|
|
11
|
+
var _prosemirrorState = require("prosemirror-state");
|
|
12
|
+
|
|
13
|
+
var _pluginKey = require("./plugin-key");
|
|
14
|
+
|
|
15
|
+
function createPlugin() {
|
|
16
|
+
return new _prosemirrorState.Plugin({
|
|
17
|
+
key: _pluginKey.pluginKey
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var fragmentMarkPlugin = function fragmentMarkPlugin() {
|
|
22
|
+
return {
|
|
23
|
+
name: 'fragmentPlugin',
|
|
24
|
+
marks: function marks() {
|
|
25
|
+
return [{
|
|
26
|
+
name: 'fragment',
|
|
27
|
+
mark: _adfSchema.fragment
|
|
28
|
+
}];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var _default = fragmentMarkPlugin;
|
|
34
|
+
exports.default = _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.pluginKey = void 0;
|
|
7
|
+
|
|
8
|
+
var _prosemirrorState = require("prosemirror-state");
|
|
9
|
+
|
|
10
|
+
var pluginKey = new _prosemirrorState.PluginKey('fragmentMarkPlugin');
|
|
11
|
+
exports.pluginKey = pluginKey;
|