@atlaskit/editor-core 175.0.4 → 176.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +23 -57
- package/CHANGELOG.md +76 -0
- package/dist/cjs/create-editor/ReactEditorView.js +1 -1
- package/dist/cjs/create-editor/create-plugins-list.js +2 -4
- package/dist/cjs/keymaps/index.js +0 -6
- package/dist/cjs/labs/next/presets/cxhtml.js +1 -3
- package/dist/cjs/labs/next/presets/mobile.js +1 -3
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +12 -5
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/alignment/pm-plugins/keymap.js +0 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +27 -4
- package/dist/cjs/plugins/annotation/nodeviews/index.js +7 -35
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +28 -2
- package/dist/cjs/plugins/annotation/utils.js +7 -3
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +1 -0
- package/dist/cjs/plugins/caption/nodeviews/index.js +4 -1
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +1 -0
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -1
- package/dist/cjs/plugins/code-block/nodeviews/code-block.js +7 -3
- package/dist/cjs/plugins/code-block/refresh-browser-selection.js +3 -1
- package/dist/cjs/plugins/code-block/styles.js +6 -2
- package/dist/cjs/plugins/code-block/ui/class-names.js +2 -0
- package/dist/cjs/plugins/collab-edit/utils.js +4 -0
- package/dist/cjs/plugins/copy-button/commands.js +5 -3
- package/dist/cjs/plugins/emoji/messages.js +17 -0
- package/dist/cjs/plugins/emoji/nodeviews/emoji.js +18 -2
- package/dist/cjs/plugins/expand/pm-plugins/keymap.js +11 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +17 -13
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/index.js +2 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +9 -1
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +20 -1
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +6 -2
- package/dist/cjs/plugins/floating-toolbar/ui/Select.js +10 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +1 -0
- package/dist/cjs/plugins/help-dialog/ui/index.js +1 -4
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +2 -2
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -9
- package/dist/cjs/plugins/media/index.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +27 -3
- package/dist/cjs/plugins/media/pm-plugins/main.js +17 -2
- package/dist/cjs/plugins/media/toolbar/alt-text.js +1 -0
- package/dist/cjs/plugins/media/toolbar/linking.js +1 -0
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +9 -6
- package/dist/cjs/plugins/media/ui/ToolbarMedia/toolbar-media-messages.js +2 -2
- package/dist/cjs/plugins/mentions/messages.js +5 -0
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +18 -2
- package/dist/cjs/plugins/mentions/styles.js +1 -1
- package/dist/cjs/plugins/mentions/ui/Mention/index.js +15 -0
- package/dist/cjs/plugins/panel/actions.js +1 -1
- package/dist/cjs/plugins/panel/index.js +1 -0
- package/dist/cjs/plugins/panel/toolbar.js +2 -2
- package/dist/cjs/plugins/paste/index.js +2 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/quick-insert/assets/action.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/code.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/custom-panel.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/date.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/decision.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/divider.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/emoji.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/expand.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/fallback.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/feedback.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading1.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading2.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading3.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading4.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading5.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading6.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/images.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/layout.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/link.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/list-number.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/list.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/mention.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-error.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-note.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-success.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-warning.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/quote.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/status.js +3 -0
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +26 -3
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +41 -4
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/styles.js +6 -1
- package/dist/cjs/plugins/text-color/utils/color.js +3 -0
- package/dist/cjs/plugins/type-ahead/commands/insert-type-ahead-item.js +4 -3
- package/dist/cjs/plugins/type-ahead/index.js +42 -22
- package/dist/cjs/plugins/type-ahead/messages.js +13 -3
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +25 -16
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +126 -64
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +12 -14
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +37 -14
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +36 -5
- package/dist/cjs/plugins/type-ahead/utils.js +3 -1
- package/dist/cjs/ui/Alignment/index.js +0 -1
- package/dist/cjs/ui/Appearance/Chromeless.js +1 -1
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +6 -2
- package/dist/cjs/ui/ColorPickerButton/index.js +4 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -4
- package/dist/cjs/ui/ConfigPanel/Fields/Select.js +1 -3
- package/dist/cjs/ui/Dropdown/index.js +28 -1
- package/dist/cjs/ui/DropdownMenu/index.js +25 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +0 -1
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +166 -0
- package/dist/cjs/ui/styles.js +12 -18
- package/dist/cjs/utils/clipboard.js +17 -12
- package/dist/cjs/utils/document.js +13 -0
- package/dist/cjs/utils/index.js +0 -9
- package/dist/cjs/utils/input-rules.js +7 -5
- package/dist/cjs/utils/table.js +35 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +2 -4
- package/dist/es2019/keymaps/index.js +1 -1
- package/dist/es2019/labs/next/presets/cxhtml.js +1 -3
- package/dist/es2019/labs/next/presets/mobile.js +1 -3
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +11 -4
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/es2019/plugins/alignment/pm-plugins/keymap.js +1 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +26 -4
- package/dist/es2019/plugins/annotation/nodeviews/index.js +7 -31
- package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +24 -3
- package/dist/es2019/plugins/annotation/utils.js +8 -4
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +1 -0
- package/dist/es2019/plugins/caption/nodeviews/index.js +4 -1
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +1 -0
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -1
- package/dist/es2019/plugins/code-block/nodeviews/code-block.js +7 -3
- package/dist/es2019/plugins/code-block/refresh-browser-selection.js +2 -1
- package/dist/es2019/plugins/code-block/styles.js +21 -5
- package/dist/es2019/plugins/code-block/ui/class-names.js +2 -0
- package/dist/es2019/plugins/collab-edit/utils.js +5 -1
- package/dist/es2019/plugins/copy-button/commands.js +5 -3
- package/dist/es2019/plugins/emoji/messages.js +8 -0
- package/dist/es2019/plugins/emoji/nodeviews/emoji.js +16 -2
- package/dist/es2019/plugins/expand/pm-plugins/keymap.js +10 -1
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +17 -13
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -0
- package/dist/es2019/plugins/floating-toolbar/index.js +2 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +9 -1
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +20 -1
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Select.js +9 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +1 -0
- package/dist/es2019/plugins/help-dialog/ui/index.js +1 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +2 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +15 -2
- package/dist/es2019/plugins/media/index.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +25 -4
- package/dist/es2019/plugins/media/pm-plugins/main.js +14 -1
- package/dist/es2019/plugins/media/toolbar/alt-text.js +1 -0
- package/dist/es2019/plugins/media/toolbar/linking.js +1 -0
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +4 -2
- package/dist/es2019/plugins/media/ui/ToolbarMedia/toolbar-media-messages.js +2 -2
- package/dist/es2019/plugins/mentions/messages.js +5 -0
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -2
- package/dist/es2019/plugins/mentions/styles.js +2 -1
- package/dist/es2019/plugins/mentions/ui/Mention/index.js +12 -0
- package/dist/es2019/plugins/panel/actions.js +2 -2
- package/dist/es2019/plugins/panel/index.js +1 -0
- package/dist/es2019/plugins/panel/toolbar.js +3 -3
- package/dist/es2019/plugins/paste/index.js +2 -3
- package/dist/es2019/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/quick-insert/assets/action.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/code.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/custom-panel.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/date.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/decision.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/divider.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/emoji.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/expand.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/fallback.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/feedback.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading1.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading2.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading3.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading4.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading5.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading6.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/images.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/layout.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/link.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/list-number.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/list.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/mention.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-error.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-note.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-success.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-warning.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/quote.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/status.js +3 -0
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +26 -5
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +42 -4
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/styles.js +6 -1
- package/dist/es2019/plugins/text-color/utils/color.js +3 -0
- package/dist/es2019/plugins/type-ahead/commands/insert-type-ahead-item.js +4 -3
- package/dist/es2019/plugins/type-ahead/index.js +17 -4
- package/dist/es2019/plugins/type-ahead/messages.js +13 -3
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +24 -16
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +108 -61
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +12 -14
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +32 -8
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +42 -7
- package/dist/es2019/plugins/type-ahead/utils.js +3 -1
- package/dist/es2019/ui/Alignment/index.js +1 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +4 -0
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +4 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CustomSelect.js +2 -4
- package/dist/es2019/ui/ConfigPanel/Fields/Select.js +1 -3
- package/dist/es2019/ui/Dropdown/index.js +16 -1
- package/dist/es2019/ui/DropdownMenu/index.js +13 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +148 -0
- package/dist/es2019/ui/styles.js +1 -7
- package/dist/es2019/utils/clipboard.js +11 -9
- package/dist/es2019/utils/document.js +14 -1
- package/dist/es2019/utils/index.js +0 -7
- package/dist/es2019/utils/input-rules.js +4 -3
- package/dist/es2019/utils/table.js +28 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +2 -4
- package/dist/esm/keymaps/index.js +1 -1
- package/dist/esm/labs/next/presets/cxhtml.js +1 -3
- package/dist/esm/labs/next/presets/mobile.js +1 -3
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +11 -4
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/alignment/pm-plugins/keymap.js +1 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +29 -4
- package/dist/esm/plugins/annotation/nodeviews/index.js +7 -33
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +28 -3
- package/dist/esm/plugins/annotation/utils.js +8 -4
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +1 -0
- package/dist/esm/plugins/caption/nodeviews/index.js +4 -1
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +1 -0
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -1
- package/dist/esm/plugins/code-block/nodeviews/code-block.js +7 -3
- package/dist/esm/plugins/code-block/refresh-browser-selection.js +2 -1
- package/dist/esm/plugins/code-block/styles.js +7 -2
- package/dist/esm/plugins/code-block/ui/class-names.js +2 -0
- package/dist/esm/plugins/collab-edit/utils.js +5 -2
- package/dist/esm/plugins/copy-button/commands.js +5 -3
- package/dist/esm/plugins/emoji/messages.js +8 -0
- package/dist/esm/plugins/emoji/nodeviews/emoji.js +15 -2
- package/dist/esm/plugins/expand/pm-plugins/keymap.js +10 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +17 -13
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -0
- package/dist/esm/plugins/floating-toolbar/index.js +2 -0
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -1
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +20 -1
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +5 -2
- package/dist/esm/plugins/floating-toolbar/ui/Select.js +9 -3
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +1 -0
- package/dist/esm/plugins/help-dialog/ui/index.js +1 -4
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +2 -2
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +23 -9
- package/dist/esm/plugins/media/index.js +2 -2
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +25 -4
- package/dist/esm/plugins/media/pm-plugins/main.js +14 -1
- package/dist/esm/plugins/media/toolbar/alt-text.js +1 -0
- package/dist/esm/plugins/media/toolbar/linking.js +1 -0
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
- package/dist/esm/plugins/media/ui/ToolbarMedia/toolbar-media-messages.js +2 -2
- package/dist/esm/plugins/mentions/messages.js +5 -0
- package/dist/esm/plugins/mentions/nodeviews/mention.js +15 -2
- package/dist/esm/plugins/mentions/styles.js +1 -1
- package/dist/esm/plugins/mentions/ui/Mention/index.js +13 -0
- package/dist/esm/plugins/panel/actions.js +2 -2
- package/dist/esm/plugins/panel/index.js +1 -0
- package/dist/esm/plugins/panel/toolbar.js +3 -3
- package/dist/esm/plugins/paste/index.js +2 -3
- package/dist/esm/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/quick-insert/assets/action.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/code.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/custom-panel.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/date.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/decision.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/divider.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/emoji.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/expand.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/fallback.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/feedback.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading1.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading2.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading3.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading4.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading5.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading6.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/images.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/layout.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/link.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/list-number.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/list.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/mention.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-error.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-note.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-success.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-warning.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/quote.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/status.js +3 -0
- package/dist/esm/plugins/selection/gap-cursor/actions.js +24 -5
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +44 -4
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/styles.js +6 -1
- package/dist/esm/plugins/text-color/utils/color.js +3 -0
- package/dist/esm/plugins/type-ahead/commands/insert-type-ahead-item.js +4 -3
- package/dist/esm/plugins/type-ahead/index.js +35 -22
- package/dist/esm/plugins/type-ahead/messages.js +13 -3
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +24 -16
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +124 -64
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +12 -14
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +35 -14
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +38 -7
- package/dist/esm/plugins/type-ahead/utils.js +3 -1
- package/dist/esm/ui/Alignment/index.js +1 -2
- package/dist/esm/ui/Appearance/Chromeless.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
- package/dist/esm/ui/ColorPickerButton/index.js +4 -0
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +2 -4
- package/dist/esm/ui/ConfigPanel/Fields/Select.js +1 -3
- package/dist/esm/ui/Dropdown/index.js +17 -1
- package/dist/esm/ui/DropdownMenu/index.js +14 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +147 -0
- package/dist/esm/ui/styles.js +12 -16
- package/dist/esm/utils/clipboard.js +17 -12
- package/dist/esm/utils/document.js +14 -1
- package/dist/esm/utils/index.js +0 -7
- package/dist/esm/utils/input-rules.js +4 -3
- package/dist/esm/utils/table.js +28 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/keymaps/index.d.ts +1 -1
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +2 -0
- package/dist/types/plugins/annotation/utils.d.ts +2 -2
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +2 -0
- package/dist/types/plugins/code-block/refresh-browser-selection.d.ts +2 -0
- package/dist/types/plugins/code-block/ui/class-names.d.ts +2 -0
- package/dist/types/plugins/emoji/messages.d.ts +7 -0
- package/dist/types/plugins/extension/index.d.ts +0 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +6 -0
- package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +4 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/media/ui/CaptionPlaceholder/index.d.ts +3 -3
- package/dist/types/plugins/mentions/messages.d.ts +5 -0
- package/dist/types/plugins/mentions/ui/Mention/index.d.ts +1 -0
- package/dist/types/plugins/paste/index.d.ts +1 -2
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/selection/gap-cursor/actions.d.ts +2 -0
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +3 -0
- package/dist/types/plugins/type-ahead/messages.d.ts +10 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +7 -1
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -0
- package/dist/types/types/extension-config.d.ts +0 -1
- package/dist/types/ui/ConfigPanel/Fields/SelectItem.d.ts +1 -1
- package/dist/types/ui/Dropdown/index.d.ts +6 -1
- package/dist/types/ui/DropdownMenu/index.d.ts +2 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +3 -1
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +18 -0
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/clipboard.d.ts +1 -1
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/input-rules.d.ts +2 -2
- package/dist/types/utils/table.d.ts +3 -0
- package/docs/3-annotations.tsx +1 -0
- package/package.json +27 -25
- package/report.api.md +74 -74
|
@@ -4,7 +4,7 @@ import { AnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
|
4
4
|
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
6
6
|
import { AnnotationSelectionType } from './types';
|
|
7
|
-
import { sum } from '../../utils';
|
|
7
|
+
import { isText, isParagraph, sum } from '../../utils';
|
|
8
8
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, ACTION } from '../analytics';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -265,7 +265,7 @@ export var isSelectionValid = function isSelectionValid(state) {
|
|
|
265
265
|
return AnnotationSelectionType.DISABLED;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
if (disallowOnWhitespace && hasInvalidWhitespaceNode(selection)) {
|
|
268
|
+
if (disallowOnWhitespace && hasInvalidWhitespaceNode(selection, state.schema)) {
|
|
269
269
|
return AnnotationSelectionType.INVALID;
|
|
270
270
|
}
|
|
271
271
|
|
|
@@ -315,10 +315,14 @@ function isEmptyTextSelection(selection, schema) {
|
|
|
315
315
|
*/
|
|
316
316
|
|
|
317
317
|
|
|
318
|
-
export function hasInvalidWhitespaceNode(selection) {
|
|
318
|
+
export function hasInvalidWhitespaceNode(selection, schema) {
|
|
319
319
|
var foundInvalidWhitespace = false;
|
|
320
320
|
var content = selection.content().content;
|
|
321
321
|
content.descendants(function (node) {
|
|
322
|
+
if (isText(node, schema)) {
|
|
323
|
+
return false;
|
|
324
|
+
}
|
|
325
|
+
|
|
322
326
|
if (node.textContent.trim() === '') {
|
|
323
327
|
// Trailing new lines do not result in the annotation spanning into
|
|
324
328
|
// the trailing new line so can be ignored when looking for invalid
|
|
@@ -326,7 +330,7 @@ export function hasInvalidWhitespaceNode(selection) {
|
|
|
326
330
|
var nodeIsTrailingNewLine = // it is the final node
|
|
327
331
|
node.eq(content.lastChild) && // and there are multiple nodes
|
|
328
332
|
!node.eq(content.firstChild) && // and it is a paragraph node
|
|
329
|
-
node
|
|
333
|
+
isParagraph(node, schema);
|
|
330
334
|
|
|
331
335
|
if (!nodeIsTrailingNewLine) {
|
|
332
336
|
foundInvalidWhitespace = true;
|
|
@@ -41,6 +41,7 @@ export default (function () {
|
|
|
41
41
|
var createWidget = function createWidget(side) {
|
|
42
42
|
var node = document.createElement('span');
|
|
43
43
|
node.contentEditable = 'true';
|
|
44
|
+
node.setAttribute('aria-hidden', 'true');
|
|
44
45
|
node.appendChild(document.createTextNode(ZERO_WIDTH_SPACE));
|
|
45
46
|
node.className = 'cursor-target';
|
|
46
47
|
return Decoration.widget(selection.from, node, {
|
|
@@ -44,7 +44,10 @@ export var CaptionNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
44
44
|
}, {
|
|
45
45
|
key: "getContentDOM",
|
|
46
46
|
value: function getContentDOM() {
|
|
47
|
-
var dom = document.createElement('div');
|
|
47
|
+
var dom = document.createElement('div'); // setting a className prevents PM/Chrome mutation observer from
|
|
48
|
+
// incorrectly deleting nodes
|
|
49
|
+
|
|
50
|
+
dom.className = 'caption-wrapper';
|
|
48
51
|
return {
|
|
49
52
|
dom: dom
|
|
50
53
|
};
|
|
@@ -67,9 +67,10 @@ var getCustomStyles = function getCustomStyles(selected, disabled) {
|
|
|
67
67
|
return [primitiveStyles, unselectedStyles, interactiveStyles];
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
//tabindex is -1 as the menu options should be focusable explicitly only by arrow keys.
|
|
70
71
|
var OptionRoot = function OptionRoot(props) {
|
|
71
72
|
return jsx("div", _extends({}, props, {
|
|
72
|
-
tabIndex:
|
|
73
|
+
tabIndex: -1
|
|
73
74
|
}));
|
|
74
75
|
};
|
|
75
76
|
|
|
@@ -17,6 +17,8 @@ var toDOM = function toDOM(node) {
|
|
|
17
17
|
class: codeBlockClassNames.start,
|
|
18
18
|
contenteditable: 'false'
|
|
19
19
|
}], ['div', {
|
|
20
|
+
class: codeBlockClassNames.contentWrapper
|
|
21
|
+
}, ['div', {
|
|
20
22
|
class: codeBlockClassNames.gutter,
|
|
21
23
|
contenteditable: 'false'
|
|
22
24
|
}], ['div', {
|
|
@@ -26,7 +28,7 @@ var toDOM = function toDOM(node) {
|
|
|
26
28
|
spellcheck: 'false',
|
|
27
29
|
contenteditable: 'true',
|
|
28
30
|
'data-testid': 'code-block--code'
|
|
29
|
-
}, 0]], ['div', {
|
|
31
|
+
}, 0]]], ['div', {
|
|
30
32
|
class: codeBlockClassNames.end,
|
|
31
33
|
contenteditable: 'false'
|
|
32
34
|
}]];
|
|
@@ -79,7 +81,8 @@ export var CodeBlockView = /*#__PURE__*/function () {
|
|
|
79
81
|
if ((_this$dom = this.dom) !== null && _this$dom !== void 0 && _this$dom.childNodes && this.dom.childNodes.length > 1) {
|
|
80
82
|
var _contentView$childNod;
|
|
81
83
|
|
|
82
|
-
var
|
|
84
|
+
var contentWrapper = this.dom.childNodes[1];
|
|
85
|
+
var contentView = contentWrapper === null || contentWrapper === void 0 ? void 0 : contentWrapper.childNodes[1];
|
|
83
86
|
|
|
84
87
|
if ((contentView === null || contentView === void 0 ? void 0 : (_contentView$childNod = contentView.childNodes) === null || _contentView$childNod === void 0 ? void 0 : _contentView$childNod.length) > 0) {
|
|
85
88
|
var codeElement = contentView.firstChild;
|
|
@@ -104,7 +107,8 @@ export var CodeBlockView = /*#__PURE__*/function () {
|
|
|
104
107
|
var _this$dom2;
|
|
105
108
|
|
|
106
109
|
if ((_this$dom2 = this.dom) !== null && _this$dom2 !== void 0 && _this$dom2.childNodes && this.dom.childNodes.length > 1) {
|
|
107
|
-
var
|
|
110
|
+
var contentWrapper = this.dom.childNodes[1];
|
|
111
|
+
var contentView = contentWrapper === null || contentWrapper === void 0 ? void 0 : contentWrapper.childNodes[1];
|
|
108
112
|
|
|
109
113
|
if (contentView !== null && contentView !== void 0 && contentView.childNodes && contentView.childNodes.length > 1) {
|
|
110
114
|
var savedInnerHTML = '';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject;
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { R75 } from '@atlaskit/theme/colors';
|
|
@@ -8,6 +8,11 @@ import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderS
|
|
|
8
8
|
import { token } from '@atlaskit/tokens';
|
|
9
9
|
import { codeBlockClassNames } from './ui/class-names';
|
|
10
10
|
import { codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
11
|
+
|
|
12
|
+
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
13
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), token('color.blanket.danger', 'none'));
|
|
14
|
+
};
|
|
15
|
+
|
|
11
16
|
export var codeBlockStyles = function codeBlockStyles(props) {
|
|
12
|
-
return css(
|
|
17
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), codeBlockSharedStyles(props), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder), codeBlockClassNames.gutter, token('color.background.danger', R75), token('color.text.danger', akEditorDeleteIconColor), GutterDangerOverlay(), codeBlockClassNames.content, token('color.blanket.danger', akEditorDeleteBackground), codeBlockClassNames.gutter, token('color.background.danger', 'rgba(255, 143, 115, 0.5)'), token('color.text.danger', akEditorDeleteIconColor), GutterDangerOverlay(), codeBlockClassNames.content, token('color.blanket.danger', 'rgba(255, 189, 173, 0.5)'));
|
|
13
18
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
2
2
|
export var codeBlockClassNames = {
|
|
3
|
+
container: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER,
|
|
3
4
|
start: CodeBlockSharedCssClassName.CODEBLOCK_START,
|
|
4
5
|
end: CodeBlockSharedCssClassName.CODEBLOCK_END,
|
|
6
|
+
contentWrapper: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER,
|
|
5
7
|
gutter: CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER,
|
|
6
8
|
content: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
7
9
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
2
|
import { Selection, TextSelection } from 'prosemirror-state';
|
|
5
3
|
import { Decoration } from 'prosemirror-view';
|
|
6
4
|
import * as themeColors from '@atlaskit/theme/colors';
|
|
@@ -8,12 +6,17 @@ import { hexToRgba } from '@atlaskit/adf-schema';
|
|
|
8
6
|
import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/utils';
|
|
9
7
|
import { addAnalytics } from '../analytics/utils';
|
|
10
8
|
import { EVENT_TYPE, ACTION, ACTION_SUBJECT } from '../analytics/types';
|
|
9
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-7269
|
|
10
|
+
|
|
11
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
11
12
|
export var colors = [themeColors.R100, themeColors.R300, themeColors.R500, themeColors.Y100, themeColors.Y300, themeColors.Y500, themeColors.G100, themeColors.G300, themeColors.G500, themeColors.T100, themeColors.T300, themeColors.T500, themeColors.B100, themeColors.B300, themeColors.B500, themeColors.P100, themeColors.P300, themeColors.P500, themeColors.N70, themeColors.N200, themeColors.N800].map(function (solid) {
|
|
12
13
|
return {
|
|
13
14
|
solid: solid,
|
|
14
15
|
selection: hexToRgba(solid, 0.2)
|
|
15
16
|
};
|
|
16
17
|
});
|
|
18
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
19
|
+
|
|
17
20
|
export var getAvatarColor = function getAvatarColor(str) {
|
|
18
21
|
var hash = 0;
|
|
19
22
|
|
|
@@ -26,8 +26,10 @@ export function createToolbarCopyCommandForMark(markType) {
|
|
|
26
26
|
// since we're copying the text inside a paragraph, it will always be 1 1
|
|
27
27
|
// https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
|
|
28
28
|
|
|
29
|
-
div.firstChild.setAttribute('data-pm-slice', '1 1 []');
|
|
30
|
-
|
|
29
|
+
div.firstChild.setAttribute('data-pm-slice', '1 1 []'); // If we're copying a hyperlink, we'd copy the url as the fallback plain text
|
|
30
|
+
|
|
31
|
+
var linkUrl = domNode.getAttribute('href');
|
|
32
|
+
copyHTMLToClipboard(div, markType.name === 'link' && linkUrl ? linkUrl : undefined);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
var copyToClipboardTr = state.tr;
|
|
@@ -135,7 +137,7 @@ export var createToolbarCopyCommandForNode = function createToolbarCopyCommandFo
|
|
|
135
137
|
div.firstChild.setAttribute('data-pm-slice', '0 0 []');
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
copyHTMLToClipboard(div
|
|
140
|
+
copyHTMLToClipboard(div);
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
copyToClipboardTr.setMeta('scrollIntoView', false);
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Emoji from '../ui/Emoji';
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import { messages } from '../messages';
|
|
5
|
+
var EmojiAssistiveTextComponent = /*#__PURE__*/React.memo(function (_ref) {
|
|
6
|
+
var emojiShortName = _ref.emojiShortName;
|
|
7
|
+
var intl = useIntl();
|
|
8
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
9
|
+
className: 'assistive'
|
|
10
|
+
}, "".concat(intl.formatMessage(messages.emojiNodeLabel), " ").concat(emojiShortName));
|
|
11
|
+
});
|
|
3
12
|
export function EmojiNodeView(props) {
|
|
4
13
|
var _props$node$attrs = props.node.attrs,
|
|
5
14
|
shortName = _props$node$attrs.shortName,
|
|
6
15
|
id = _props$node$attrs.id,
|
|
7
16
|
text = _props$node$attrs.text;
|
|
8
|
-
return /*#__PURE__*/React.createElement(
|
|
17
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EmojiAssistiveTextComponent, {
|
|
18
|
+
emojiShortName: shortName
|
|
19
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
20
|
+
"aria-hidden": "true"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Emoji, {
|
|
9
22
|
providers: props.providerFactory,
|
|
10
23
|
id: id,
|
|
11
24
|
shortName: shortName,
|
|
12
25
|
fallback: text
|
|
13
|
-
});
|
|
26
|
+
})));
|
|
14
27
|
}
|
|
@@ -8,6 +8,7 @@ import { expandClassNames } from '../ui/class-names';
|
|
|
8
8
|
import { deleteExpand, focusTitle } from '../commands';
|
|
9
9
|
import { getPluginState as getSelectionPluginState } from '../../selection/plugin-factory';
|
|
10
10
|
import { RelativeSelectionPos } from '../../selection/types';
|
|
11
|
+
import { isPositionNearTableRow } from '../../../utils/table';
|
|
11
12
|
|
|
12
13
|
var isExpandNode = function isExpandNode(node) {
|
|
13
14
|
return (node === null || node === void 0 ? void 0 : node.type.name) === 'expand' || (node === null || node === void 0 ? void 0 : node.type.name) === 'nestedExpand';
|
|
@@ -97,7 +98,15 @@ export function expandKeymap() {
|
|
|
97
98
|
var $from = state.selection.$from;
|
|
98
99
|
|
|
99
100
|
if (editorView.endOfTextblock('up')) {
|
|
100
|
-
var expand = findExpand(state);
|
|
101
|
+
var expand = findExpand(state); // Moving UP in a table should move the cursor to the row above
|
|
102
|
+
// however when an expand is in a table cell to the left of the
|
|
103
|
+
// current table cell, arrow UP moves the cursor to the left
|
|
104
|
+
// see ED-15425
|
|
105
|
+
|
|
106
|
+
if (isPositionNearTableRow($from, schema, 'before') && !expand) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
|
|
101
110
|
var prevCursorPos = Math.max($from.pos - $from.parentOffset - 1, 0); // move cursor from expand's content to its title
|
|
102
111
|
|
|
103
112
|
if (expand && expand.start === prevCursorPos) {
|
|
@@ -33,7 +33,7 @@ function getSpellCheck(featureFlags) {
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
export function createFeatureFlagsFromProps(props) {
|
|
36
|
-
var _props$featureFlags, _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$
|
|
36
|
+
var _props$featureFlags, _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$collabEdit, _props$collabEdit2, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39;
|
|
37
37
|
|
|
38
38
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
39
39
|
var tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
|
|
@@ -60,19 +60,23 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
60
60
|
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags14 = props.featureFlags) === null || _props$featureFlags14 === void 0 ? void 0 : _props$featureFlags14.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags15 = props.featureFlags) !== null && _props$featureFlags15 !== void 0 && _props$featureFlags15.useErrorBoundaryDocStructure) : false),
|
|
61
61
|
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.synchronyErrorDocStructure) : false),
|
|
62
62
|
enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.enableViewUpdateSubscription) : false),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.saferDispatchedTransactions) : false)),
|
|
63
|
+
collabAvatarScroll: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.collabAvatarScroll) : false),
|
|
64
|
+
ufo: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.ufo) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.ufo) : false),
|
|
65
|
+
twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.twoLineEditorToolbar) : false),
|
|
66
|
+
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.saferDispatchedTransactions) : false)),
|
|
68
67
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
69
|
-
chromeCursorHandlerFixedVersion: typeof ((_props$
|
|
70
|
-
viewChangingExperimentToolbarStyle: typeof ((_props$
|
|
68
|
+
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
69
|
+
viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined,
|
|
71
70
|
tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
|
|
72
|
-
showHoverPreview: Boolean(typeof ((_props$
|
|
73
|
-
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$
|
|
74
|
-
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$
|
|
75
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$
|
|
76
|
-
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags)
|
|
71
|
+
showHoverPreview: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.showHoverPreview) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31.showHoverPreview) : false),
|
|
72
|
+
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags32 = props.featureFlags) === null || _props$featureFlags32 === void 0 ? void 0 : _props$featureFlags32.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags33 = props.featureFlags) !== null && _props$featureFlags33 !== void 0 && _props$featureFlags33.indentationButtonsInTheToolbar) : false)),
|
|
73
|
+
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags35 = props.featureFlags) !== null && _props$featureFlags35 !== void 0 && _props$featureFlags35.floatingToolbarCopyButton) : false)),
|
|
74
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
75
|
+
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
76
|
+
// Including fallback to props.featureFlags so that mobile feature flags
|
|
77
|
+
// are included (they are not kebab cased)
|
|
78
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.restartNumberedLists) === true,
|
|
79
|
+
listNumberContinuity: normalizedFeatureFlags.listNumberContinuity === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.listNumberContinuity) === true,
|
|
80
|
+
restartNumberedListsToolbar: normalizedFeatureFlags.restartNumberedListsToolbar === true || ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.restartNumberedListsToolbar) === true
|
|
77
81
|
});
|
|
78
82
|
}
|
|
@@ -100,6 +100,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
100
100
|
},
|
|
101
101
|
fitWidth: 352,
|
|
102
102
|
zIndex: stackBelowOtherEditorFloatingPanels,
|
|
103
|
+
disableArrowKeyNavigation: true,
|
|
103
104
|
trigger: jsx(ToolbarButton, {
|
|
104
105
|
buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
|
|
105
106
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
@@ -191,6 +191,7 @@ var floatingToolbarPlugin = function floatingToolbarPlugin() {
|
|
|
191
191
|
className = _config$className === void 0 ? '' : _config$className,
|
|
192
192
|
height = config.height,
|
|
193
193
|
width = config.width,
|
|
194
|
+
zIndex = config.zIndex,
|
|
194
195
|
_config$offset = config.offset,
|
|
195
196
|
offset = _config$offset === void 0 ? [0, 12] : _config$offset,
|
|
196
197
|
forcePlacement = config.forcePlacement,
|
|
@@ -235,6 +236,7 @@ var floatingToolbarPlugin = function floatingToolbarPlugin() {
|
|
|
235
236
|
fitWidth: width,
|
|
236
237
|
alignX: align,
|
|
237
238
|
stick: true,
|
|
239
|
+
zIndex: zIndex,
|
|
238
240
|
mountTo: popupsMountPoint,
|
|
239
241
|
boundariesElement: popupsBoundariesElement,
|
|
240
242
|
scrollableElement: popupsScrollableElement,
|
|
@@ -78,6 +78,15 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
_defineProperty(_assertThisInitialized(_this), "hideonEsc", function () {
|
|
82
|
+
var _document$querySelect;
|
|
83
|
+
|
|
84
|
+
_this.hide(); //Focus the trigger button only on Escape
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
(_document$querySelect = document.querySelector("[data-testid=".concat(_this.props.buttonTestId, "]"))) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.focus();
|
|
88
|
+
});
|
|
89
|
+
|
|
81
90
|
return _this;
|
|
82
91
|
}
|
|
83
92
|
|
|
@@ -142,7 +151,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
142
151
|
scrollableElement: scrollableElement,
|
|
143
152
|
isOpen: isOpen,
|
|
144
153
|
handleClickOutside: this.hide,
|
|
145
|
-
handleEscapeKeydown: this.
|
|
154
|
+
handleEscapeKeydown: this.hideonEsc,
|
|
146
155
|
fitWidth: fitWidth + fitTolerance,
|
|
147
156
|
fitHeight: fitHeight + fitTolerance,
|
|
148
157
|
trigger: trigger
|
|
@@ -29,6 +29,7 @@ export var menuItemDimensions = {
|
|
|
29
29
|
var spacer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n padding: 8px;\n"])));
|
|
30
30
|
var menuContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: ", "px;\n\n // temporary solution to retain spacing defined by @atlaskit/Item\n & button {\n min-height: ", "px;\n padding: 8px 8px 7px;\n\n & > [data-item-elem-before] {\n margin-right: ", "px;\n }\n }\n"])), menuItemDimensions.width, gridSize() * 4, gridSize() / 2);
|
|
31
31
|
export var itemSpacing = gridSize() / 2;
|
|
32
|
+
var DropdownButtonItem = ButtonItem;
|
|
32
33
|
|
|
33
34
|
var Dropdown = /*#__PURE__*/function (_Component) {
|
|
34
35
|
_inherits(Dropdown, _Component);
|
|
@@ -56,7 +57,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
56
57
|
}, items.filter(function (item) {
|
|
57
58
|
return !item.hidden;
|
|
58
59
|
}).map(function (item, idx) {
|
|
59
|
-
var itemContent = jsx(
|
|
60
|
+
var itemContent = jsx(DropdownButtonItem, {
|
|
60
61
|
key: idx,
|
|
61
62
|
iconBefore: _this.renderSelected(item, intl),
|
|
62
63
|
iconAfter: item.elemAfter,
|
|
@@ -74,6 +75,24 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
74
75
|
isDisabled: item.disabled,
|
|
75
76
|
onMouseDown: function onMouseDown(e) {
|
|
76
77
|
e.preventDefault();
|
|
78
|
+
},
|
|
79
|
+
onMouseOver: function onMouseOver(e) {
|
|
80
|
+
if (item.onMouseOver) {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
dispatchCommand(item.onMouseOver);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
86
|
+
if (item.onMouseEnter) {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
dispatchCommand(item.onMouseEnter);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
92
|
+
if (item.onMouseLeave) {
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
dispatchCommand(item.onMouseLeave);
|
|
95
|
+
}
|
|
77
96
|
}
|
|
78
97
|
}, item.title);
|
|
79
98
|
|
|
@@ -152,11 +152,14 @@ export var ExtensionsPlaceholder = function ExtensionsPlaceholder(props) {
|
|
|
152
152
|
return _getExtensions.apply(this, arguments);
|
|
153
153
|
}
|
|
154
154
|
}, []);
|
|
155
|
+
var nodeAdf = React.useMemo(function () {
|
|
156
|
+
return nodeToJSON(node);
|
|
157
|
+
}, [node]);
|
|
155
158
|
var extensionItems = React.useMemo(function () {
|
|
156
|
-
return getContextualToolbarItemsFromModule(extensions,
|
|
159
|
+
return getContextualToolbarItemsFromModule(extensions, nodeAdf, createExtensionAPI({
|
|
157
160
|
editorView: editorView
|
|
158
161
|
}));
|
|
159
|
-
}, [extensions,
|
|
162
|
+
}, [extensions, nodeAdf, editorView]);
|
|
160
163
|
|
|
161
164
|
if (!extensionItems.length) {
|
|
162
165
|
return null;
|
|
@@ -18,9 +18,14 @@ export default function Search(props) {
|
|
|
18
18
|
});
|
|
19
19
|
},
|
|
20
20
|
menuPortal: function menuPortal(base) {
|
|
21
|
-
var _selectRef$current;
|
|
21
|
+
var _selectRef$current, _selectRef$current$se, _selectRef$current$se2, _selectRef$current2, _selectRef$current2$s, _selectRef$current2$s2, _selectRef$current2$s3;
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
// ED:16095: We add two possible getter paths for safely reaching into the underlying
|
|
24
|
+
// react-select element. We first try a getter that conforms with react-select v5 APIs,
|
|
25
|
+
// Failing that, we try a getter consistent with react-select v4 APIs. (We
|
|
26
|
+
// handle both as consumers may control the time of the actual dependency version
|
|
27
|
+
// cutover).
|
|
28
|
+
var controlWrapper = (selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : (_selectRef$current$se = _selectRef$current.select) === null || _selectRef$current$se === void 0 ? void 0 : (_selectRef$current$se2 = _selectRef$current$se.controlRef) === null || _selectRef$current$se2 === void 0 ? void 0 : _selectRef$current$se2.parentNode) || (selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current2 = selectRef.current) === null || _selectRef$current2 === void 0 ? void 0 : (_selectRef$current2$s = _selectRef$current2.select) === null || _selectRef$current2$s === void 0 ? void 0 : (_selectRef$current2$s2 = _selectRef$current2$s.select) === null || _selectRef$current2$s2 === void 0 ? void 0 : (_selectRef$current2$s3 = _selectRef$current2$s2.controlRef) === null || _selectRef$current2$s3 === void 0 ? void 0 : _selectRef$current2$s3.parentNode);
|
|
24
29
|
var menuPortalStyles = controlWrapper && props.setDisableParentScroll ? {
|
|
25
30
|
// since the portal is now outside, we need to position it as before
|
|
26
31
|
top: controlWrapper.offsetTop,
|
|
@@ -58,6 +63,7 @@ export default function Search(props) {
|
|
|
58
63
|
styles: style,
|
|
59
64
|
menuPortalTarget: props.mountPoint,
|
|
60
65
|
onMenuOpen: onMenuOpen,
|
|
61
|
-
onMenuClose: onMenuClose
|
|
66
|
+
onMenuClose: onMenuClose,
|
|
67
|
+
"aria-label": props.ariaLabel
|
|
62
68
|
});
|
|
63
69
|
}
|
|
@@ -351,6 +351,7 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
351
351
|
if (event.key === 'Escape') {
|
|
352
352
|
var _this$props$editorVie;
|
|
353
353
|
|
|
354
|
+
_this.currentSelectedItemIndex = 0;
|
|
354
355
|
(_this$props$editorVie = _this.props.editorView) === null || _this$props$editorVie === void 0 ? void 0 : _this$props$editorVie.focus();
|
|
355
356
|
event.preventDefault();
|
|
356
357
|
event.stopPropagation();
|
|
@@ -334,10 +334,7 @@ export var formatting = function formatting(_ref) {
|
|
|
334
334
|
}
|
|
335
335
|
}, {
|
|
336
336
|
name: formatMessage(alignmentMessages.alignRight),
|
|
337
|
-
type: 'alignment'
|
|
338
|
-
keymap: function keymap() {
|
|
339
|
-
return keymaps.alignRight;
|
|
340
|
-
}
|
|
337
|
+
type: 'alignment'
|
|
341
338
|
}];
|
|
342
339
|
};
|
|
343
340
|
var shortcutNamesWithoutKeymap = ['emoji', 'mention', 'quickInsert'];
|
|
@@ -81,8 +81,8 @@ var createInsertBlockItems = function createInsertBlockItems(config) {
|
|
|
81
81
|
|
|
82
82
|
if (mediaSupported && mediaUploadsEnabled) {
|
|
83
83
|
items.push(media({
|
|
84
|
-
content: formatMessage(messages.
|
|
85
|
-
tooltipDescription: formatMessage(messages.
|
|
84
|
+
content: formatMessage(messages.addMediaFiles),
|
|
85
|
+
tooltipDescription: formatMessage(messages.mediaFilesDescription),
|
|
86
86
|
disabled: false
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
@@ -109,12 +109,18 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
_defineProperty(_assertThisInitialized(_this), "togglePlusMenuVisibility", function () {
|
|
112
|
+
_defineProperty(_assertThisInitialized(_this), "togglePlusMenuVisibility", function (event) {
|
|
113
113
|
var isPlusMenuOpen = _this.state.isPlusMenuOpen;
|
|
114
114
|
|
|
115
115
|
_this.onOpenChange({
|
|
116
116
|
isPlusMenuOpen: !isPlusMenuOpen
|
|
117
117
|
});
|
|
118
|
+
|
|
119
|
+
if ((event === null || event === void 0 ? void 0 : event.key) === 'Escape') {
|
|
120
|
+
var _ref;
|
|
121
|
+
|
|
122
|
+
(_ref = _this.plusButtonRef || _this.dropdownButtonRef) === null || _ref === void 0 ? void 0 : _ref.focus();
|
|
123
|
+
}
|
|
118
124
|
});
|
|
119
125
|
|
|
120
126
|
_defineProperty(_assertThisInitialized(_this), "toggleEmojiPicker", function () {
|
|
@@ -144,7 +150,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
144
150
|
});
|
|
145
151
|
|
|
146
152
|
_defineProperty(_assertThisInitialized(_this), "handleEmojiPressEscape", function () {
|
|
153
|
+
var _this$emojiButtonRef;
|
|
154
|
+
|
|
147
155
|
_this.toggleEmojiPicker(INPUT_METHOD.KEYBOARD);
|
|
156
|
+
|
|
157
|
+
(_this$emojiButtonRef = _this.emojiButtonRef) === null || _this$emojiButtonRef === void 0 ? void 0 : _this$emojiButtonRef.focus();
|
|
148
158
|
});
|
|
149
159
|
|
|
150
160
|
_defineProperty(_assertThisInitialized(_this), "handleEmojiClickOutside", function (e) {
|
|
@@ -181,6 +191,10 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
181
191
|
}
|
|
182
192
|
});
|
|
183
193
|
|
|
194
|
+
_defineProperty(_assertThisInitialized(_this), "handleClick", function () {
|
|
195
|
+
_this.togglePlusMenuVisibility();
|
|
196
|
+
});
|
|
197
|
+
|
|
184
198
|
_defineProperty(_assertThisInitialized(_this), "toggleLinkPanel", function (inputMethod) {
|
|
185
199
|
var editorView = _this.props.editorView;
|
|
186
200
|
showLinkToolbar(inputMethod)(editorView.state, editorView.dispatch);
|
|
@@ -320,9 +334,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
320
334
|
openElementBrowserModal()(_this.props.editorView.state, _this.props.editorView.dispatch);
|
|
321
335
|
});
|
|
322
336
|
|
|
323
|
-
_defineProperty(_assertThisInitialized(_this), "onItemActivated", function (
|
|
324
|
-
var item =
|
|
325
|
-
inputMethod =
|
|
337
|
+
_defineProperty(_assertThisInitialized(_this), "onItemActivated", function (_ref2) {
|
|
338
|
+
var item = _ref2.item,
|
|
339
|
+
inputMethod = _ref2.inputMethod;
|
|
326
340
|
var _this$props3 = _this.props,
|
|
327
341
|
editorView = _this$props3.editorView,
|
|
328
342
|
editorActions = _this$props3.editorActions,
|
|
@@ -442,8 +456,8 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
442
456
|
});
|
|
443
457
|
});
|
|
444
458
|
|
|
445
|
-
_defineProperty(_assertThisInitialized(_this), "insertInsertMenuItem", function (
|
|
446
|
-
var item =
|
|
459
|
+
_defineProperty(_assertThisInitialized(_this), "insertInsertMenuItem", function (_ref3) {
|
|
460
|
+
var item = _ref3.item;
|
|
447
461
|
return _this.onItemActivated({
|
|
448
462
|
item: item,
|
|
449
463
|
inputMethod: INPUT_METHOD.INSERT_MENU
|
|
@@ -473,8 +487,8 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
473
487
|
popupsScrollableElement = _this$props4.popupsScrollableElement,
|
|
474
488
|
emojiProvider = _this$props4.emojiProvider,
|
|
475
489
|
replacePlusMenuWithElementBrowser = _this$props4.replacePlusMenuWithElementBrowser;
|
|
476
|
-
var dropdownEmoji = this.state.dropdownItems.some(function (
|
|
477
|
-
var name =
|
|
490
|
+
var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
|
|
491
|
+
var name = _ref4.value.name;
|
|
478
492
|
return name === 'emoji';
|
|
479
493
|
});
|
|
480
494
|
var dropDownButtonRef = replacePlusMenuWithElementBrowser ? this.plusButtonRef : this.dropdownButtonRef;
|
|
@@ -548,7 +562,7 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
548
562
|
items: this.state.dropdownItems,
|
|
549
563
|
onRef: this.handleDropDownButtonRef,
|
|
550
564
|
onPlusButtonRef: this.handlePlusButtonRef,
|
|
551
|
-
onClick: this.
|
|
565
|
+
onClick: this.handleClick,
|
|
552
566
|
onItemActivated: this.insertInsertMenuItem,
|
|
553
567
|
onInsert: this.insertInsertMenuItem,
|
|
554
568
|
onOpenChange: this.onOpenChange,
|
|
@@ -177,8 +177,8 @@ var mediaPlugin = function mediaPlugin(options) {
|
|
|
177
177
|
var formatMessage = _ref10.formatMessage;
|
|
178
178
|
return [{
|
|
179
179
|
id: 'media',
|
|
180
|
-
title: formatMessage(messages.
|
|
181
|
-
description: formatMessage(messages.
|
|
180
|
+
title: formatMessage(messages.mediaFiles),
|
|
181
|
+
description: formatMessage(messages.mediaFilesDescription),
|
|
182
182
|
priority: 400,
|
|
183
183
|
keywords: ['attachment', 'gif', 'media', 'picture', 'image', 'video'],
|
|
184
184
|
icon: function icon() {
|