@atlaskit/editor-core 180.0.0 → 181.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/CHANGELOG.md +117 -0
- package/codemods/180.1.0-update-to-editor-migration-component.ts +8 -0
- package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +156 -0
- package/codemods/migrates/rename-editor-to-editor-migration-component.ts +34 -0
- package/dist/cjs/actions/index.js +26 -11
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +9 -764
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +753 -0
- package/dist/cjs/create-editor/ReactEditorViewNext.js +16 -0
- package/dist/cjs/create-editor/create-plugins-list.js +31 -3
- package/dist/cjs/create-editor/feature-flags-from-props.js +3 -2
- package/dist/cjs/create-editor/preset-utils.js +27 -0
- package/dist/cjs/editor-next/editor-internal.js +147 -0
- package/dist/cjs/editor-next/editor-migration-component.js +51 -0
- package/dist/cjs/editor-next/hooks/useEditorMeasuresConstructor.js +36 -0
- package/dist/cjs/editor-next/hooks/useMeasureEditorMountTime.js +42 -0
- package/dist/cjs/editor-next/hooks/useProviderFactory.js +73 -0
- package/dist/cjs/editor-next/index.js +143 -0
- package/dist/cjs/editor-next/utils/deprecationWarnings.js +45 -0
- package/dist/cjs/editor-next/utils/editorMeasureTTICallback.js +44 -0
- package/dist/cjs/editor-next/utils/editorPropTypes.js +36 -0
- package/dist/cjs/editor-next/utils/getBaseFontSize.js +17 -0
- package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
- package/dist/cjs/editor-next/utils/handleProviders.js +51 -0
- package/dist/cjs/editor-next/utils/onEditorCreated.js +28 -0
- package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +68 -0
- package/dist/cjs/editor-next/utils/trackEditorActions.js +101 -0
- package/dist/cjs/editor.js +139 -445
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/keymaps/consts.js +1 -16
- package/dist/cjs/labs/next/internal/hooks/use-analytics/index.js +4 -4
- package/dist/cjs/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +6 -6
- package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +117 -0
- package/dist/cjs/labs/next/presets/cxhtml.js +56 -55
- package/dist/cjs/labs/next/presets/default.js +15 -42
- package/dist/cjs/labs/next/presets/mobile.js +76 -89
- package/dist/cjs/labs/next/presets/universal.js +337 -255
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +48 -13
- package/dist/cjs/plugins/analytics/index.js +2 -3
- package/dist/cjs/plugins/analytics/plugin.js +11 -6
- package/dist/cjs/plugins/analytics/utils.js +0 -11
- package/dist/cjs/plugins/annotation/utils.js +2 -36
- package/dist/cjs/plugins/base/pm-plugins/filter-steps.js +1 -1
- package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +98 -56
- package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
- package/dist/cjs/plugins/base/utils/input-latency-tracking.js +24 -25
- package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +36 -9
- package/dist/cjs/plugins/caption/index.js +0 -7
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -3
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +10 -5
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/cjs/plugins/clipboard/pm-plugins/main.js +4 -1
- package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
- package/dist/cjs/plugins/collab-edit/plugin.js +2 -3
- package/dist/cjs/plugins/collab-edit/provider/index.js +1 -8
- package/dist/cjs/plugins/collab-edit/provider/types.js +1 -12
- package/dist/cjs/plugins/context-panel/index.js +1 -6
- package/dist/cjs/plugins/data-consumer/index.js +0 -8
- package/dist/cjs/plugins/date/utils/internal.js +0 -4
- package/dist/cjs/plugins/extension/commands.js +1 -8
- package/dist/cjs/plugins/extension/toolbar.js +7 -1
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/cjs/plugins/feedback-dialog/index.js +1 -4
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Button.js +9 -3
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +48 -14
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +24 -21
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +32 -5
- package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
- package/dist/cjs/plugins/fragment/index.js +0 -8
- package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- package/dist/cjs/plugins/help-dialog/commands.js +2 -6
- package/dist/cjs/plugins/hyperlink/analytics.js +5 -5
- package/dist/cjs/plugins/hyperlink/index.js +1 -1
- package/dist/cjs/plugins/hyperlink/pm-plugins/main.js +9 -5
- package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -4
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +4 -3
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -0
- package/dist/cjs/plugins/layout/styles.js +10 -1
- package/dist/cjs/plugins/list/utils/find.js +0 -28
- package/dist/cjs/plugins/list/utils/indentation.js +1 -25
- package/dist/cjs/plugins/list/utils/node.js +0 -5
- package/dist/cjs/plugins/list/utils/selection.js +2 -15
- package/dist/cjs/plugins/media/commands/helpers.js +12 -40
- package/dist/cjs/plugins/media/commands/index.js +4 -4
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +14 -12
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +310 -205
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +2 -27
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +1 -4
- package/dist/cjs/plugins/media/utils/media-common.js +1 -20
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +100 -16
- package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
- package/dist/cjs/plugins/mobile-dimensions/index.js +1 -4
- package/dist/cjs/plugins/panel/utils.js +4 -1
- package/dist/cjs/plugins/paste/handlers.js +128 -13
- package/dist/cjs/plugins/paste/index.js +1 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +133 -88
- package/dist/cjs/plugins/paste/pm-plugins/main.js +12 -3
- package/dist/cjs/plugins/paste/util/index.js +0 -46
- package/dist/cjs/plugins/placeholder-text/index.js +2 -2
- package/dist/cjs/plugins/quick-insert/assets/index.js +1 -27
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +49 -44
- package/dist/cjs/plugins/status/index.js +9 -3
- package/dist/cjs/plugins/status/ui/statusPicker.js +8 -2
- package/dist/cjs/plugins/status/utils.js +1 -15
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +48 -12
- package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +22 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +3 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
- package/dist/cjs/plugins/text-formatting/utils.js +1 -35
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
- package/dist/cjs/plugins/type-ahead/constants.js +1 -7
- package/dist/cjs/plugins/type-ahead/index.js +1 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +2 -35
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +79 -106
- package/dist/cjs/plugins/type-ahead/utils.js +3 -22
- package/dist/cjs/test-utils.js +4 -12
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
- package/dist/cjs/ui/ChromeCollapsed/index.js +1 -0
- package/dist/cjs/ui/CollapsedEditor/index.js +7 -13
- package/dist/cjs/ui/ColorPalette/index.js +18 -0
- package/dist/cjs/ui/ColorPickerButton/index.js +73 -7
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/cjs/ui/ConfigPanel/utils.js +4 -17
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/ContextPanel/context.js +13 -12
- package/dist/cjs/ui/Dropdown/index.js +7 -2
- package/dist/cjs/ui/DropdownMenu/index.js +7 -2
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +1 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
- package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
- package/dist/cjs/ui/PanelTextInput/index.js +4 -4
- package/dist/cjs/ui/PortalProvider/index.js +5 -5
- package/dist/cjs/ui/Resizer/utils.js +1 -3
- package/dist/cjs/ui/WidthEmitter/index.js +29 -35
- package/dist/cjs/ui/styles.js +3 -7
- package/dist/cjs/utils/document.js +15 -0
- package/dist/cjs/utils/extensions.js +6 -7
- package/dist/cjs/utils/get-editor-plugins.js +30 -0
- package/dist/cjs/utils/index.js +9 -269
- package/dist/cjs/utils/input-rules.js +1 -15
- package/dist/cjs/utils/linking-utils.js +1 -1
- package/dist/cjs/utils/performance/components/RenderTracking.js +1 -1
- package/dist/cjs/utils/performance/safer-transactions.js +1 -1
- package/dist/cjs/utils/prepare-extension-provider.js +25 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +24 -10
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +3 -710
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +697 -0
- package/dist/es2019/create-editor/ReactEditorViewNext.js +7 -0
- package/dist/es2019/create-editor/create-plugins-list.js +26 -3
- package/dist/es2019/create-editor/feature-flags-from-props.js +3 -2
- package/dist/es2019/create-editor/preset-utils.js +15 -0
- package/dist/es2019/editor-next/editor-internal.js +142 -0
- package/dist/es2019/editor-next/editor-migration-component.js +27 -0
- package/dist/es2019/editor-next/hooks/useEditorMeasuresConstructor.js +30 -0
- package/dist/es2019/editor-next/hooks/useMeasureEditorMountTime.js +35 -0
- package/dist/es2019/editor-next/hooks/useProviderFactory.js +62 -0
- package/dist/es2019/editor-next/index.js +96 -0
- package/dist/es2019/editor-next/utils/deprecationWarnings.js +39 -0
- package/dist/es2019/editor-next/utils/editorMeasureTTICallback.js +40 -0
- package/dist/es2019/editor-next/utils/editorPropTypes.js +29 -0
- package/dist/es2019/editor-next/utils/getBaseFontSize.js +11 -0
- package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
- package/dist/es2019/editor-next/utils/handleProviders.js +46 -0
- package/dist/es2019/editor-next/utils/onEditorCreated.js +21 -0
- package/dist/es2019/editor-next/utils/sendDurationAnalytics.js +40 -0
- package/dist/es2019/editor-next/utils/trackEditorActions.js +78 -0
- package/dist/es2019/editor.js +122 -398
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/keymaps/consts.js +7 -11
- package/dist/es2019/labs/next/internal/hooks/use-analytics/index.js +2 -2
- package/dist/es2019/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +2 -3
- package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +105 -0
- package/dist/es2019/labs/next/presets/cxhtml.js +56 -53
- package/dist/es2019/labs/next/presets/default.js +18 -38
- package/dist/es2019/labs/next/presets/mobile.js +88 -88
- package/dist/es2019/labs/next/presets/universal.js +347 -263
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +41 -12
- package/dist/es2019/plugins/analytics/index.js +3 -4
- package/dist/es2019/plugins/analytics/plugin.js +8 -2
- package/dist/es2019/plugins/analytics/utils.js +0 -4
- package/dist/es2019/plugins/annotation/utils.js +2 -30
- package/dist/es2019/plugins/base/pm-plugins/filter-steps.js +1 -1
- package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +96 -58
- package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
- package/dist/es2019/plugins/base/utils/input-latency-tracking.js +23 -23
- package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +31 -5
- package/dist/es2019/plugins/caption/index.js +0 -2
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +10 -3
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/es2019/plugins/card/pm-plugins/main.js +9 -4
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/es2019/plugins/clipboard/pm-plugins/main.js +3 -1
- package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
- package/dist/es2019/plugins/collab-edit/plugin.js +1 -2
- package/dist/es2019/plugins/collab-edit/provider/index.js +1 -1
- package/dist/es2019/plugins/collab-edit/provider/types.js +1 -10
- package/dist/es2019/plugins/context-panel/index.js +0 -3
- package/dist/es2019/plugins/data-consumer/index.js +0 -7
- package/dist/es2019/plugins/date/utils/internal.js +0 -3
- package/dist/es2019/plugins/extension/commands.js +0 -6
- package/dist/es2019/plugins/extension/toolbar.js +7 -1
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +12 -2
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +3 -0
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/es2019/plugins/feedback-dialog/index.js +0 -2
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Button.js +9 -3
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +45 -12
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +29 -1
- package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
- package/dist/es2019/plugins/fragment/index.js +0 -7
- package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- package/dist/es2019/plugins/help-dialog/commands.js +1 -2
- package/dist/es2019/plugins/hyperlink/analytics.js +1 -1
- package/dist/es2019/plugins/hyperlink/index.js +1 -1
- package/dist/es2019/plugins/hyperlink/pm-plugins/main.js +8 -4
- package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +9 -3
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -2
- package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +24 -0
- package/dist/es2019/plugins/layout/styles.js +12 -4
- package/dist/es2019/plugins/list/utils/find.js +0 -27
- package/dist/es2019/plugins/list/utils/indentation.js +0 -23
- package/dist/es2019/plugins/list/utils/node.js +1 -4
- package/dist/es2019/plugins/list/utils/selection.js +2 -15
- package/dist/es2019/plugins/media/commands/helpers.js +9 -35
- package/dist/es2019/plugins/media/commands/index.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +3 -3
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +70 -37
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +3 -30
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +1 -4
- package/dist/es2019/plugins/media/utils/media-common.js +1 -19
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +64 -16
- package/dist/es2019/plugins/mentions/type-ahead/index.js +1 -14
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/es2019/plugins/mobile-dimensions/index.js +0 -3
- package/dist/es2019/plugins/panel/utils.js +4 -1
- package/dist/es2019/plugins/paste/handlers.js +127 -5
- package/dist/es2019/plugins/paste/index.js +1 -2
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +131 -93
- package/dist/es2019/plugins/paste/pm-plugins/main.js +13 -4
- package/dist/es2019/plugins/paste/util/index.js +5 -45
- package/dist/es2019/plugins/placeholder-text/index.js +1 -1
- package/dist/es2019/plugins/quick-insert/assets/index.js +0 -8
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +56 -56
- package/dist/es2019/plugins/status/index.js +8 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +8 -2
- package/dist/es2019/plugins/status/utils.js +1 -11
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +48 -12
- package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +20 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +4 -2
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
- package/dist/es2019/plugins/text-formatting/utils.js +0 -27
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +16 -1
- package/dist/es2019/plugins/type-ahead/constants.js +0 -5
- package/dist/es2019/plugins/type-ahead/index.js +1 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -35
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +73 -92
- package/dist/es2019/plugins/type-ahead/utils.js +0 -23
- package/dist/es2019/test-utils.js +4 -7
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
- package/dist/es2019/ui/ChromeCollapsed/index.js +1 -0
- package/dist/es2019/ui/CollapsedEditor/index.js +7 -11
- package/dist/es2019/ui/ColorPalette/index.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +66 -9
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/es2019/ui/ConfigPanel/utils.js +0 -6
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ContextPanel/context.js +5 -4
- package/dist/es2019/ui/Dropdown/index.js +5 -2
- package/dist/es2019/ui/DropdownMenu/index.js +5 -2
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +1 -1
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
- package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/PanelTextInput/index.js +3 -3
- package/dist/es2019/ui/PortalProvider/index.js +1 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/es2019/ui/WidthEmitter/index.js +25 -29
- package/dist/es2019/ui/styles.js +0 -6
- package/dist/es2019/utils/document.js +11 -1
- package/dist/es2019/utils/extensions.js +1 -3
- package/dist/es2019/utils/get-editor-plugins.js +23 -0
- package/dist/es2019/utils/index.js +13 -199
- package/dist/es2019/utils/input-rules.js +0 -14
- package/dist/es2019/utils/linking-utils.js +1 -1
- package/dist/es2019/utils/performance/components/RenderTracking.js +1 -1
- package/dist/es2019/utils/performance/safer-transactions.js +1 -1
- package/dist/es2019/utils/prepare-extension-provider.js +13 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +24 -10
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +9 -765
- package/dist/esm/create-editor/ReactEditorViewInternal.js +747 -0
- package/dist/esm/create-editor/ReactEditorViewNext.js +7 -0
- package/dist/esm/create-editor/create-plugins-list.js +30 -3
- package/dist/esm/create-editor/feature-flags-from-props.js +3 -2
- package/dist/esm/create-editor/preset-utils.js +21 -0
- package/dist/esm/editor-next/editor-internal.js +141 -0
- package/dist/esm/editor-next/editor-migration-component.js +44 -0
- package/dist/esm/editor-next/hooks/useEditorMeasuresConstructor.js +30 -0
- package/dist/esm/editor-next/hooks/useMeasureEditorMountTime.js +35 -0
- package/dist/esm/editor-next/hooks/useProviderFactory.js +66 -0
- package/dist/esm/editor-next/index.js +138 -0
- package/dist/esm/editor-next/utils/deprecationWarnings.js +39 -0
- package/dist/esm/editor-next/utils/editorMeasureTTICallback.js +38 -0
- package/dist/esm/editor-next/utils/editorPropTypes.js +28 -0
- package/dist/esm/editor-next/utils/getBaseFontSize.js +11 -0
- package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
- package/dist/esm/editor-next/utils/handleProviders.js +45 -0
- package/dist/esm/editor-next/utils/onEditorCreated.js +21 -0
- package/dist/esm/editor-next/utils/sendDurationAnalytics.js +61 -0
- package/dist/esm/editor-next/utils/trackEditorActions.js +94 -0
- package/dist/esm/editor.js +139 -442
- package/dist/esm/index.js +2 -1
- package/dist/esm/keymaps/consts.js +7 -11
- package/dist/esm/labs/next/internal/hooks/use-analytics/index.js +2 -2
- package/dist/esm/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +2 -3
- package/dist/esm/labs/next/presets/create-stub-internal-apis.js +110 -0
- package/dist/esm/labs/next/presets/cxhtml.js +56 -55
- package/dist/esm/labs/next/presets/default.js +18 -41
- package/dist/esm/labs/next/presets/mobile.js +88 -90
- package/dist/esm/labs/next/presets/universal.js +337 -255
- package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +48 -13
- package/dist/esm/plugins/analytics/index.js +3 -4
- package/dist/esm/plugins/analytics/plugin.js +7 -2
- package/dist/esm/plugins/analytics/utils.js +0 -9
- package/dist/esm/plugins/annotation/utils.js +2 -32
- package/dist/esm/plugins/base/pm-plugins/filter-steps.js +1 -1
- package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +98 -56
- package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
- package/dist/esm/plugins/base/utils/input-latency-tracking.js +24 -25
- package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +36 -9
- package/dist/esm/plugins/caption/index.js +0 -2
- package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -3
- package/dist/esm/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/esm/plugins/card/pm-plugins/main.js +10 -5
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/esm/plugins/clipboard/pm-plugins/main.js +4 -1
- package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
- package/dist/esm/plugins/collab-edit/plugin.js +1 -2
- package/dist/esm/plugins/collab-edit/provider/index.js +1 -1
- package/dist/esm/plugins/collab-edit/provider/types.js +1 -10
- package/dist/esm/plugins/context-panel/index.js +0 -3
- package/dist/esm/plugins/data-consumer/index.js +0 -7
- package/dist/esm/plugins/date/utils/internal.js +0 -3
- package/dist/esm/plugins/extension/commands.js +0 -6
- package/dist/esm/plugins/extension/toolbar.js +7 -1
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/esm/plugins/feedback-dialog/index.js +0 -2
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/esm/plugins/floating-toolbar/ui/Button.js +9 -3
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +48 -14
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +24 -21
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +32 -5
- package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
- package/dist/esm/plugins/fragment/index.js +0 -7
- package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- package/dist/esm/plugins/help-dialog/commands.js +0 -3
- package/dist/esm/plugins/hyperlink/analytics.js +1 -1
- package/dist/esm/plugins/hyperlink/index.js +1 -1
- package/dist/esm/plugins/hyperlink/pm-plugins/main.js +9 -5
- package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -4
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -2
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -0
- package/dist/esm/plugins/layout/styles.js +11 -2
- package/dist/esm/plugins/list/utils/find.js +0 -27
- package/dist/esm/plugins/list/utils/indentation.js +0 -23
- package/dist/esm/plugins/list/utils/node.js +1 -4
- package/dist/esm/plugins/list/utils/selection.js +2 -12
- package/dist/esm/plugins/media/commands/helpers.js +9 -35
- package/dist/esm/plugins/media/commands/index.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +14 -12
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +311 -206
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +3 -28
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +1 -4
- package/dist/esm/plugins/media/utils/media-common.js +1 -17
- package/dist/esm/plugins/mentions/nodeviews/mention.js +97 -16
- package/dist/esm/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/esm/plugins/mobile-dimensions/index.js +0 -3
- package/dist/esm/plugins/panel/utils.js +4 -1
- package/dist/esm/plugins/paste/handlers.js +127 -13
- package/dist/esm/plugins/paste/index.js +1 -2
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +130 -86
- package/dist/esm/plugins/paste/pm-plugins/main.js +13 -4
- package/dist/esm/plugins/paste/util/index.js +5 -45
- package/dist/esm/plugins/placeholder-text/index.js +2 -2
- package/dist/esm/plugins/quick-insert/assets/index.js +0 -20
- package/dist/esm/plugins/selection/gap-cursor/actions.js +52 -45
- package/dist/esm/plugins/status/index.js +9 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +8 -2
- package/dist/esm/plugins/status/utils.js +1 -13
- package/dist/esm/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +48 -12
- package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +23 -3
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +4 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
- package/dist/esm/plugins/text-formatting/utils.js +0 -29
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
- package/dist/esm/plugins/type-ahead/constants.js +0 -5
- package/dist/esm/plugins/type-ahead/index.js +1 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -31
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +79 -106
- package/dist/esm/plugins/type-ahead/utils.js +2 -20
- package/dist/esm/test-utils.js +4 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
- package/dist/esm/ui/ChromeCollapsed/index.js +1 -0
- package/dist/esm/ui/CollapsedEditor/index.js +7 -13
- package/dist/esm/ui/ColorPalette/index.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +74 -8
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/esm/ui/ConfigPanel/utils.js +3 -14
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ContextPanel/context.js +8 -8
- package/dist/esm/ui/Dropdown/index.js +7 -2
- package/dist/esm/ui/DropdownMenu/index.js +7 -2
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +1 -1
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
- package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/PanelTextInput/index.js +4 -4
- package/dist/esm/ui/PortalProvider/index.js +1 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/esm/ui/WidthEmitter/index.js +28 -37
- package/dist/esm/ui/styles.js +2 -5
- package/dist/esm/utils/document.js +15 -1
- package/dist/esm/utils/extensions.js +1 -3
- package/dist/esm/utils/get-editor-plugins.js +23 -0
- package/dist/esm/utils/index.js +13 -196
- package/dist/esm/utils/input-rules.js +0 -13
- package/dist/esm/utils/linking-utils.js +1 -1
- package/dist/esm/utils/performance/components/RenderTracking.js +1 -1
- package/dist/esm/utils/performance/safer-transactions.js +1 -1
- package/dist/esm/utils/prepare-extension-provider.js +17 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +5 -5
- package/dist/types/create-editor/ReactEditorView.d.ts +5 -110
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +114 -0
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +8 -0
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -5
- package/dist/types/create-editor/preset-utils.d.ts +2 -0
- package/dist/types/editor-next/editor-internal.d.ts +44 -0
- package/dist/types/editor-next/editor-migration-component.d.ts +5 -0
- package/dist/types/editor-next/hooks/useEditorMeasuresConstructor.d.ts +17 -0
- package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +13 -0
- package/dist/types/editor-next/hooks/useProviderFactory.d.ts +21 -0
- package/dist/types/editor-next/index.d.ts +34 -0
- package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -0
- package/dist/types/editor-next/utils/editorMeasureTTICallback.d.ts +5 -0
- package/dist/types/editor-next/utils/editorPropTypes.d.ts +19 -0
- package/dist/types/editor-next/utils/getBaseFontSize.d.ts +6 -0
- package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
- package/dist/types/editor-next/utils/handleProviders.d.ts +14 -0
- package/dist/types/editor-next/utils/onEditorCreated.d.ts +12 -0
- package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +15 -0
- package/dist/types/editor-next/utils/trackEditorActions.d.ts +29 -0
- package/dist/types/editor.d.ts +50 -25
- package/dist/types/index.d.ts +1 -0
- package/dist/types/keymaps/consts.d.ts +0 -11
- package/dist/types/labs/next/internal/hooks/use-analytics/index.d.ts +1 -1
- package/dist/types/labs/next/presets/create-stub-internal-apis.d.ts +16 -0
- package/dist/types/labs/next/presets/cxhtml.d.ts +33 -1
- package/dist/types/labs/next/presets/default.d.ts +67 -10
- package/dist/types/labs/next/presets/mobile.d.ts +33 -1
- package/dist/types/labs/next/presets/universal.d.ts +5 -13
- package/dist/types/labs/next/presets/useUniversalPreset.d.ts +7 -0
- package/dist/types/nodeviews/context-adapter.d.ts +0 -1
- package/dist/types/nodeviews/index.d.ts +0 -1
- package/dist/types/plugins/alignment/index.d.ts +1 -1
- package/dist/types/plugins/alignment/pm-plugins/types.d.ts +0 -11
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +3 -1
- package/dist/types/plugins/analytics/index.d.ts +3 -6
- package/dist/types/plugins/analytics/plugin.d.ts +3 -1
- package/dist/types/plugins/analytics/utils.d.ts +2 -3
- package/dist/types/plugins/annotation/index.d.ts +3 -1
- package/dist/types/plugins/annotation/utils.d.ts +0 -17
- package/dist/types/plugins/avatar-group/index.d.ts +3 -1
- package/dist/types/plugins/base/index.d.ts +3 -1
- package/dist/types/plugins/base/pm-plugins/filter-steps.d.ts +1 -1
- package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
- package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +1 -3
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +3 -1
- package/dist/types/plugins/block-type/index.d.ts +3 -1
- package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/blocktype-button.d.ts +1 -0
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -0
- package/dist/types/plugins/breakout/index.d.ts +3 -1
- package/dist/types/plugins/caption/index.d.ts +0 -2
- package/dist/types/plugins/card/index.d.ts +3 -1
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +2 -1
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/util/state.d.ts +1 -0
- package/dist/types/plugins/card/types.d.ts +3 -0
- package/dist/types/plugins/code-bidi-warning/index.d.ts +3 -1
- package/dist/types/plugins/code-block/actions.d.ts +0 -4
- package/dist/types/plugins/code-block/index.d.ts +3 -1
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
- package/dist/types/plugins/collab-edit/index.d.ts +3 -1
- package/dist/types/plugins/collab-edit/provider/index.d.ts +1 -2
- package/dist/types/plugins/collab-edit/provider/types.d.ts +1 -36
- package/dist/types/plugins/context-panel/index.d.ts +3 -4
- package/dist/types/plugins/data-consumer/index.d.ts +0 -2
- package/dist/types/plugins/date/utils/internal.d.ts +0 -1
- package/dist/types/plugins/emoji/index.d.ts +3 -1
- package/dist/types/plugins/expand/index.d.ts +3 -1
- package/dist/types/plugins/extension/commands.d.ts +0 -1
- package/dist/types/plugins/extension/index.d.ts +3 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
- package/dist/types/plugins/extension/toolbar.d.ts +5 -0
- package/dist/types/plugins/feature-flags-context/index.d.ts +3 -1
- package/dist/types/plugins/feedback-dialog/index.d.ts +3 -3
- package/dist/types/plugins/find-replace/index.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +4 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +6 -2
- package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
- package/dist/types/plugins/fragment/index.d.ts +0 -2
- package/dist/types/plugins/grid/index.d.ts +3 -1
- package/dist/types/plugins/help-dialog/commands.d.ts +0 -1
- package/dist/types/plugins/help-dialog/index.d.ts +3 -1
- package/dist/types/plugins/history/actions.d.ts +1 -2
- package/dist/types/plugins/hyperlink/analytics.d.ts +1 -1
- package/dist/types/plugins/hyperlink/index.d.ts +3 -1
- package/dist/types/plugins/hyperlink/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/hyperlink/types.d.ts +3 -1
- package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +3 -1
- package/dist/types/plugins/insert-block/index.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -0
- package/dist/types/plugins/layout/index.d.ts +3 -1
- package/dist/types/plugins/layout/styles.d.ts +2 -1
- package/dist/types/plugins/list/index.d.ts +3 -1
- package/dist/types/plugins/list/utils/find.d.ts +0 -1
- package/dist/types/plugins/list/utils/indentation.d.ts +0 -1
- package/dist/types/plugins/list/utils/node.d.ts +0 -2
- package/dist/types/plugins/list/utils/selection.d.ts +0 -3
- package/dist/types/plugins/max-content-size/index.d.ts +3 -1
- package/dist/types/plugins/media/commands/helpers.d.ts +5 -12
- package/dist/types/plugins/media/commands/index.d.ts +1 -1
- package/dist/types/plugins/media/index.d.ts +3 -1
- package/dist/types/plugins/media/nodeviews/__mocks__/mediaNodeUpdater.d.ts +3 -1
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +4 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -4
- package/dist/types/plugins/media/pm-plugins/types.d.ts +1 -4
- package/dist/types/plugins/media/utils/media-common.d.ts +0 -5
- package/dist/types/plugins/mentions/index.d.ts +3 -1
- package/dist/types/plugins/mentions/types.d.ts +1 -2
- package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +2 -3
- package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -6
- package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -4
- package/dist/types/plugins/mobile-dimensions/index.d.ts +0 -1
- package/dist/types/plugins/panel/index.d.ts +3 -1
- package/dist/types/plugins/paste/handlers.d.ts +2 -1
- package/dist/types/plugins/paste/index.d.ts +3 -2
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +10 -4
- package/dist/types/plugins/paste/util/index.d.ts +0 -6
- package/dist/types/plugins/placeholder/index.d.ts +3 -1
- package/dist/types/plugins/placeholder-text/index.d.ts +3 -1
- package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
- package/dist/types/plugins/quick-insert/index.d.ts +3 -1
- package/dist/types/plugins/save-on-enter/index.d.ts +3 -1
- package/dist/types/plugins/selection/index.d.ts +3 -1
- package/dist/types/plugins/status/index.d.ts +3 -1
- package/dist/types/plugins/status/ui/statusPicker.d.ts +3 -0
- package/dist/types/plugins/status/utils.d.ts +0 -3
- package/dist/types/plugins/submit-editor/index.d.ts +3 -1
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +3 -1
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
- package/dist/types/plugins/text-color/index.d.ts +3 -1
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +2 -0
- package/dist/types/plugins/text-formatting/index.d.ts +3 -1
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
- package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +2 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -5
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +3 -1
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
- package/dist/types/plugins/type-ahead/index.d.ts +3 -1
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -10
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -2
- package/dist/types/test-utils.d.ts +4 -5
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +55 -42
- package/dist/types/types/get-editor-props.d.ts +12 -0
- package/dist/types/types/performance-tracking.d.ts +10 -0
- package/dist/types/ui/Appearance/Chromeless.d.ts +0 -5
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +0 -7
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +3 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +29 -29
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
- package/dist/types/ui/CollapsedEditor/index.d.ts +4 -3
- package/dist/types/ui/ColorPalette/Palettes/index.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types/ui/ColorPalette/index.d.ts +2 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +5 -2
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/types.d.ts +0 -3
- package/dist/types/ui/ConfigPanel/utils.d.ts +2 -3
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ContextPanel/context.d.ts +2 -1
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +0 -3
- package/dist/types/ui/ElementBrowser/constants.d.ts +0 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +0 -5
- package/dist/types/ui/PanelTextInput/index.d.ts +1 -1
- package/dist/types/ui/PortalProvider/index.d.ts +1 -1
- package/dist/types/ui/Resizer/utils.d.ts +0 -1
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/document.d.ts +4 -3
- package/dist/types/utils/get-editor-plugins.d.ts +10 -0
- package/dist/types/utils/index.d.ts +6 -65
- package/dist/types/utils/input-rules.d.ts +1 -2
- package/dist/types/utils/linking-utils.d.ts +1 -1
- package/dist/types/utils/performance/components/RenderTracking.d.ts +1 -1
- package/dist/types/utils/performance/instrumented-plugin.d.ts +1 -1
- package/dist/types/utils/performance/safer-transactions.d.ts +1 -1
- package/dist/types/utils/prepare-extension-provider.d.ts +5 -0
- package/dist/types/utils/table.d.ts +0 -1
- package/docs/0-intro.tsx +0 -1
- package/package.json +37 -37
- package/report.api.md +307 -244
- package/dist/cjs/labs/next/presets/preset.js +0 -106
- package/dist/cjs/plugins/analytics/analytics-queue.js +0 -79
- package/dist/cjs/plugins/analytics/fire-analytics-event.js +0 -35
- package/dist/cjs/plugins/collab-edit/provider/channel.js +0 -313
- package/dist/cjs/plugins/collab-edit/provider/logger.js +0 -17
- package/dist/cjs/plugins/collab-edit/provider/mock-users.js +0 -19
- package/dist/cjs/plugins/data-consumer/plugin-key.js +0 -9
- package/dist/cjs/plugins/media/toolbar/toolbar-messages.js +0 -15
- package/dist/cjs/profiler/render-count.js +0 -60
- package/dist/cjs/ui/ColorPalette/Color/index.js +0 -9
- package/dist/cjs/ui/ConfigPanel/FieldDescription.js +0 -19
- package/dist/cjs/ui/WithPluginState/types.js +0 -5
- package/dist/es2019/labs/next/presets/preset.js +0 -71
- package/dist/es2019/plugins/analytics/analytics-queue.js +0 -53
- package/dist/es2019/plugins/analytics/fire-analytics-event.js +0 -26
- package/dist/es2019/plugins/collab-edit/provider/channel.js +0 -179
- package/dist/es2019/plugins/collab-edit/provider/logger.js +0 -8
- package/dist/es2019/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/es2019/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/es2019/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/es2019/profiler/render-count.js +0 -53
- package/dist/es2019/ui/ColorPalette/Color/index.js +0 -2
- package/dist/es2019/ui/ConfigPanel/FieldDescription.js +0 -12
- package/dist/esm/labs/next/presets/preset.js +0 -98
- package/dist/esm/plugins/analytics/analytics-queue.js +0 -71
- package/dist/esm/plugins/analytics/fire-analytics-event.js +0 -28
- package/dist/esm/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/esm/plugins/collab-edit/provider/channel.js +0 -305
- package/dist/esm/plugins/collab-edit/provider/logger.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/esm/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/esm/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/esm/profiler/render-count.js +0 -49
- package/dist/esm/ui/ColorPalette/Color/index.js +0 -2
- package/dist/esm/ui/ConfigPanel/FieldDescription.js +0 -11
- package/dist/esm/ui/WithPluginState/types.js +0 -1
- package/dist/types/labs/next/presets/preset.d.ts +0 -46
- package/dist/types/plugins/analytics/analytics-queue.d.ts +0 -10
- package/dist/types/plugins/analytics/fire-analytics-event.d.ts +0 -9
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/channel.d.ts +0 -48
- package/dist/types/plugins/collab-edit/provider/logger.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/mock-users.d.ts +0 -6
- package/dist/types/plugins/data-consumer/plugin-key.d.ts +0 -2
- package/dist/types/plugins/media/toolbar/toolbar-messages.d.ts +0 -7
- package/dist/types/profiler/render-count.d.ts +0 -14
- package/dist/types/ui/ColorPalette/Color/index.d.ts +0 -2
- package/dist/types/ui/ConfigPanel/FieldDescription.d.ts +0 -6
- package/dist/types/ui/WithPluginState/types.d.ts +0 -10
- /package/dist/cjs/{plugins/analytics/types/type-ahead.js → types/get-editor-props.js} +0 -0
- /package/dist/es2019/{plugins/analytics/types/type-ahead.js → types/get-editor-props.js} +0 -0
- /package/dist/{es2019/ui/WithPluginState/types.js → esm/types/get-editor-props.js} +0 -0
|
@@ -4,11 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.blockQuoteRule = blockQuoteRule;
|
|
8
|
-
exports.codeBlockRule = codeBlockRule;
|
|
9
7
|
exports.default = void 0;
|
|
10
|
-
exports.headingRule = headingRule;
|
|
11
|
-
exports.inputRulePlugin = inputRulePlugin;
|
|
12
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
9
|
var _inputRules = require("../../../utils/input-rules");
|
|
14
10
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
@@ -32,12 +28,6 @@ function headingRule(nodeType, maxLevel) {
|
|
|
32
28
|
function blockQuoteRule(nodeType) {
|
|
33
29
|
return (0, _inputRules.createJoinNodesRule)(/^\s*>\s$/, nodeType);
|
|
34
30
|
}
|
|
35
|
-
function codeBlockRule(nodeType) {
|
|
36
|
-
return (0, _inputRules.createWrappingTextBlockRule)({
|
|
37
|
-
match: /^```$/,
|
|
38
|
-
nodeType: nodeType
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
31
|
|
|
42
32
|
/**
|
|
43
33
|
* Get heading rules
|
|
@@ -24,6 +24,8 @@ var _styled = require("./styled");
|
|
|
24
24
|
var _keymaps = require("../../../../keymaps");
|
|
25
25
|
var _blocktypeButton = require("./blocktype-button");
|
|
26
26
|
var _keymaps2 = require("@atlaskit/editor-common/keymaps");
|
|
27
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
29
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
30
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
31
|
var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -37,18 +39,30 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
37
39
|
}
|
|
38
40
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
39
41
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
40
|
-
active: false
|
|
42
|
+
active: false,
|
|
43
|
+
isOpenedByKeyboard: false
|
|
41
44
|
});
|
|
42
45
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onOpenChange", function (attrs) {
|
|
43
|
-
_this.setState({
|
|
44
|
-
active: attrs.isOpen
|
|
45
|
-
|
|
46
|
+
_this.setState(_objectSpread(_objectSpread({}, _this.state), {}, {
|
|
47
|
+
active: attrs.isOpen,
|
|
48
|
+
isOpenedByKeyboard: attrs.isOpenedByKeyboard
|
|
49
|
+
}));
|
|
46
50
|
});
|
|
47
51
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleTriggerClick", function () {
|
|
48
52
|
_this.onOpenChange({
|
|
49
|
-
isOpen: !_this.state.active
|
|
53
|
+
isOpen: !_this.state.active,
|
|
54
|
+
isOpenedByKeyboard: false
|
|
50
55
|
});
|
|
51
56
|
});
|
|
57
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleTriggerByKeyboard", function (event) {
|
|
58
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
_this.onOpenChange({
|
|
61
|
+
isOpen: !_this.state.active,
|
|
62
|
+
isOpenedByKeyboard: true
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
52
66
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createItems", function () {
|
|
53
67
|
var formatMessage = _this.props.intl.formatMessage;
|
|
54
68
|
var _this$props$pluginSta = _this.props.pluginState,
|
|
@@ -85,9 +99,9 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
85
99
|
var blockType = item.value;
|
|
86
100
|
_this.props.setBlockType(blockType.name);
|
|
87
101
|
if (shouldCloseMenu) {
|
|
88
|
-
_this.setState({
|
|
102
|
+
_this.setState(_objectSpread(_objectSpread({}, _this.state), {}, {
|
|
89
103
|
active: false
|
|
90
|
-
});
|
|
104
|
+
}));
|
|
91
105
|
}
|
|
92
106
|
});
|
|
93
107
|
return _this;
|
|
@@ -95,7 +109,10 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
95
109
|
(0, _createClass2.default)(ToolbarBlockType, [{
|
|
96
110
|
key: "render",
|
|
97
111
|
value: function render() {
|
|
98
|
-
var
|
|
112
|
+
var _this2 = this;
|
|
113
|
+
var _this$state = this.state,
|
|
114
|
+
active = _this$state.active,
|
|
115
|
+
isOpenedByKeyboard = _this$state.isOpenedByKeyboard;
|
|
99
116
|
var _this$props = this.props,
|
|
100
117
|
popupsMountPoint = _this$props.popupsMountPoint,
|
|
101
118
|
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
@@ -137,7 +154,15 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
137
154
|
zIndex: _editorSharedStyles.akEditorMenuZIndex,
|
|
138
155
|
fitHeight: 360,
|
|
139
156
|
fitWidth: 106,
|
|
140
|
-
shouldUseDefaultRole: true
|
|
157
|
+
shouldUseDefaultRole: true,
|
|
158
|
+
shouldFocusFirstItem: function shouldFocusFirstItem() {
|
|
159
|
+
if (isOpenedByKeyboard) {
|
|
160
|
+
_this2.setState(_objectSpread(_objectSpread({}, _this2.state), {}, {
|
|
161
|
+
isOpenedByKeyboard: false
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
return isOpenedByKeyboard;
|
|
165
|
+
}
|
|
141
166
|
}, (0, _react2.jsx)(_blocktypeButton.BlockTypeButton, {
|
|
142
167
|
isSmall: isSmall,
|
|
143
168
|
isReducedSpacing: isReducedSpacing,
|
|
@@ -145,6 +170,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
145
170
|
disabled: false,
|
|
146
171
|
title: blockTypeTitles[0],
|
|
147
172
|
onClick: this.handleTriggerClick,
|
|
173
|
+
onKeyDown: this.handleTriggerByKeyboard,
|
|
148
174
|
formatMessage: formatMessage,
|
|
149
175
|
"aria-expanded": active
|
|
150
176
|
}, longestDropdownMenuItem)), (0, _react2.jsx)("span", {
|
|
@@ -160,6 +186,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
160
186
|
disabled: true,
|
|
161
187
|
title: blockTypeTitles[0],
|
|
162
188
|
onClick: this.handleTriggerClick,
|
|
189
|
+
onKeyDown: this.handleTriggerByKeyboard,
|
|
163
190
|
formatMessage: formatMessage,
|
|
164
191
|
"aria-expanded": active
|
|
165
192
|
}, longestDropdownMenuItem), (0, _react2.jsx)("span", {
|
|
@@ -5,15 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
Object.defineProperty(exports, "pluginKey", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _pluginKey.pluginKey;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
8
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
15
9
|
var _main = _interopRequireDefault(require("./pm-plugins/main"));
|
|
16
|
-
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
17
10
|
var _keymap = require("./pm-plugins/keymap");
|
|
18
11
|
var captionPlugin = function captionPlugin() {
|
|
19
12
|
return {
|
|
@@ -82,7 +82,8 @@ var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
82
82
|
var _this$props2 = this.props,
|
|
83
83
|
node = _this$props2.node,
|
|
84
84
|
cardContext = _this$props2.cardContext,
|
|
85
|
-
platform = _this$props2.platform
|
|
85
|
+
platform = _this$props2.platform,
|
|
86
|
+
showServerActions = _this$props2.showServerActions;
|
|
86
87
|
var _node$attrs = node.attrs,
|
|
87
88
|
url = _node$attrs.url,
|
|
88
89
|
data = _node$attrs.data;
|
|
@@ -95,7 +96,8 @@ var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
95
96
|
onClick: this.onClick,
|
|
96
97
|
onResolve: this.onResolve,
|
|
97
98
|
showActions: platform === 'web',
|
|
98
|
-
platform: platform
|
|
99
|
+
platform: platform,
|
|
100
|
+
showServerActions: showServerActions
|
|
99
101
|
}), this.gapCursorSpan());
|
|
100
102
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready,
|
|
101
103
|
// otherwise if we got data, we can render the card directly since it doesn't need the Provider
|
|
@@ -133,11 +135,15 @@ var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
133
135
|
}, {
|
|
134
136
|
key: "render",
|
|
135
137
|
value: function render() {
|
|
138
|
+
var _this$reactComponentP = this.reactComponentProps,
|
|
139
|
+
platform = _this$reactComponentP.platform,
|
|
140
|
+
showServerActions = _this$reactComponentP.showServerActions;
|
|
136
141
|
return /*#__PURE__*/_react.default.createElement(WrappedBlockCard, {
|
|
137
142
|
node: this.node,
|
|
138
143
|
view: this.view,
|
|
139
144
|
getPos: this.getPos,
|
|
140
|
-
platform:
|
|
145
|
+
platform: platform,
|
|
146
|
+
showServerActions: showServerActions
|
|
141
147
|
});
|
|
142
148
|
}
|
|
143
149
|
}]);
|
|
@@ -18,6 +18,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
18
18
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
19
19
|
var _utils = require("../utils");
|
|
20
20
|
var _doc = require("../pm-plugins/doc");
|
|
21
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
22
|
+
var _state = require("../pm-plugins/util/state");
|
|
23
|
+
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
21
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
26
|
function Card(SmartCardComponent, UnsupportedComponent) {
|
|
@@ -40,6 +43,7 @@ function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
40
43
|
(0, _createClass2.default)(_class, [{
|
|
41
44
|
key: "render",
|
|
42
45
|
value: function render() {
|
|
46
|
+
var _getPluginState;
|
|
43
47
|
var _titleUrlPairFromNode = (0, _utils.titleUrlPairFromNode)(this.props.node),
|
|
44
48
|
url = _titleUrlPairFromNode.url;
|
|
45
49
|
if (url && !(0, _adfSchema.isSafeUrl)(url)) {
|
|
@@ -58,10 +62,20 @@ function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
64
|
var cardContext = this.context.contextAdapter ? this.context.contextAdapter.card : undefined;
|
|
61
|
-
|
|
65
|
+
var editorAppearance = (_getPluginState = (0, _state.getPluginState)(this.props.view.state)) === null || _getPluginState === void 0 ? void 0 : _getPluginState.editorAppearance;
|
|
66
|
+
var analyticsEditorAppearance = (0, _utils2.getAnalyticsEditorAppearance)(editorAppearance);
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
68
|
+
data: {
|
|
69
|
+
attributes: {
|
|
70
|
+
location: analyticsEditorAppearance
|
|
71
|
+
},
|
|
72
|
+
// Below is added for the future implementation of Linking Platform namespaced analytics context
|
|
73
|
+
location: analyticsEditorAppearance
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(SmartCardComponent, (0, _extends2.default)({
|
|
62
76
|
key: url,
|
|
63
77
|
cardContext: cardContext
|
|
64
|
-
}, this.props));
|
|
78
|
+
}, this.props)));
|
|
65
79
|
}
|
|
66
80
|
}, {
|
|
67
81
|
key: "componentDidCatch",
|
|
@@ -73,6 +73,7 @@ var InlineCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
73
73
|
var _this$props2 = this.props,
|
|
74
74
|
node = _this$props2.node,
|
|
75
75
|
cardContext = _this$props2.cardContext,
|
|
76
|
+
showServerActions = _this$props2.showServerActions,
|
|
76
77
|
useAlternativePreloader = _this$props2.useAlternativePreloader;
|
|
77
78
|
var _node$attrs = node.attrs,
|
|
78
79
|
url = _node$attrs.url,
|
|
@@ -88,7 +89,8 @@ var InlineCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
88
89
|
container: this.scrollContainer,
|
|
89
90
|
onResolve: this.onResolve,
|
|
90
91
|
onError: this.onError,
|
|
91
|
-
inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined
|
|
92
|
+
inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
|
|
93
|
+
showServerActions: showServerActions
|
|
92
94
|
}));
|
|
93
95
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready,
|
|
94
96
|
// otherwise if we got data, we can render the card directly since it doesn't need the Provider
|
|
@@ -108,11 +110,13 @@ function InlineCardNodeView(props) {
|
|
|
108
110
|
var useAlternativePreloader = props.useAlternativePreloader,
|
|
109
111
|
node = props.node,
|
|
110
112
|
view = props.view,
|
|
111
|
-
getPos = props.getPos
|
|
113
|
+
getPos = props.getPos,
|
|
114
|
+
showServerActions = props.showServerActions;
|
|
112
115
|
return /*#__PURE__*/_react.default.createElement(WrappedInlineCard, {
|
|
113
116
|
node: node,
|
|
114
117
|
view: view,
|
|
115
118
|
getPos: getPos,
|
|
119
|
+
showServerActions: showServerActions,
|
|
116
120
|
useAlternativePreloader: useAlternativePreloader
|
|
117
121
|
});
|
|
118
122
|
}
|
|
@@ -23,11 +23,13 @@ var _resolve = require("./util/resolve");
|
|
|
23
23
|
var _state = require("./util/state");
|
|
24
24
|
var createPlugin = function createPlugin(options) {
|
|
25
25
|
return function (pmPluginFactoryParams) {
|
|
26
|
-
var
|
|
26
|
+
var editorAppearance = options.editorAppearance,
|
|
27
|
+
platform = options.platform,
|
|
27
28
|
allowResizing = options.allowResizing,
|
|
28
29
|
useAlternativePreloader = options.useAlternativePreloader,
|
|
29
30
|
fullWidthMode = options.fullWidthMode,
|
|
30
|
-
createAnalyticsEvent = options.createAnalyticsEvent
|
|
31
|
+
createAnalyticsEvent = options.createAnalyticsEvent,
|
|
32
|
+
showServerActions = options.showServerActions;
|
|
31
33
|
return new _safePlugin.SafePlugin({
|
|
32
34
|
state: {
|
|
33
35
|
init: function init() {
|
|
@@ -37,7 +39,8 @@ var createPlugin = function createPlugin(options) {
|
|
|
37
39
|
cards: [],
|
|
38
40
|
showLinkingToolbar: false,
|
|
39
41
|
smartLinkEvents: undefined,
|
|
40
|
-
createAnalyticsEvent: createAnalyticsEvent
|
|
42
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
43
|
+
editorAppearance: editorAppearance
|
|
41
44
|
};
|
|
42
45
|
},
|
|
43
46
|
apply: function apply(tr, pluginState) {
|
|
@@ -107,14 +110,16 @@ var createPlugin = function createPlugin(options) {
|
|
|
107
110
|
pmPluginFactoryParams: pmPluginFactoryParams,
|
|
108
111
|
Component: _inlineCard.InlineCardNodeView,
|
|
109
112
|
extraComponentProps: {
|
|
110
|
-
useAlternativePreloader: useAlternativePreloader
|
|
113
|
+
useAlternativePreloader: useAlternativePreloader,
|
|
114
|
+
showServerActions: showServerActions
|
|
111
115
|
}
|
|
112
116
|
}),
|
|
113
117
|
blockCard: function blockCard(node, view, getPos) {
|
|
114
118
|
var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
|
|
115
119
|
eventDispatcher = pmPluginFactoryParams.eventDispatcher;
|
|
116
120
|
var reactComponentProps = {
|
|
117
|
-
platform: platform
|
|
121
|
+
platform: platform,
|
|
122
|
+
showServerActions: showServerActions
|
|
118
123
|
};
|
|
119
124
|
var hasIntlContext = true;
|
|
120
125
|
return new _blockCard.BlockCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined, true, undefined, hasIntlContext).init();
|
|
@@ -28,6 +28,10 @@ var resolveWithProvider = function resolveWithProvider(view, outstandingRequests
|
|
|
28
28
|
exports.resolveWithProvider = resolveWithProvider;
|
|
29
29
|
var updateCardType = function updateCardType(resolvedCard, options) {
|
|
30
30
|
if ((resolvedCard === null || resolvedCard === void 0 ? void 0 : resolvedCard.type) === 'blockCard' && !options.allowBlockCards || (resolvedCard === null || resolvedCard === void 0 ? void 0 : resolvedCard.type) === 'embedCard' && !options.allowEmbeds) {
|
|
31
|
+
// clean out the 'layout' attr from an embedCard type that should be transformed into the inlineCard type.
|
|
32
|
+
if (resolvedCard.type === 'embedCard') {
|
|
33
|
+
delete resolvedCard.attrs.layout;
|
|
34
|
+
}
|
|
31
35
|
resolvedCard.type = 'inlineCard';
|
|
32
36
|
}
|
|
33
37
|
};
|
|
@@ -91,7 +91,10 @@ var createClipboardSerializer = function createClipboardSerializer(schema, getEd
|
|
|
91
91
|
var parentTable = (0, _prosemirrorUtils.findParentNodeOfType)(schema.nodes.table)(selection);
|
|
92
92
|
var attributes = parentTable === null || parentTable === void 0 ? void 0 : parentTable.node.attrs;
|
|
93
93
|
var newTable = schema.nodes.table;
|
|
94
|
-
|
|
94
|
+
// Explicitly remove local id since we are creating a new table and it should have a unique local id which will be generated.
|
|
95
|
+
var newTableNode = newTable.createChecked(_objectSpread(_objectSpread({}, attributes), {}, {
|
|
96
|
+
localId: undefined
|
|
97
|
+
}), content);
|
|
95
98
|
var newContent = _prosemirrorModel.Fragment.from(newTableNode);
|
|
96
99
|
// Pass updated content into original ProseMirror serializeFragment function.
|
|
97
100
|
// Currently incorrectly typed in @Types. See this GitHub thread: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/57668
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
6
|
+
exports.getPluginState = void 0;
|
|
9
7
|
var _pluginKey = require("../plugin-key");
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
8
|
var getPluginState = function getPluginState(state) {
|
|
13
9
|
return _pluginKey.pluginKey.getState(state);
|
|
14
10
|
};
|
|
15
|
-
exports.getPluginState = getPluginState;
|
|
16
|
-
var setPluginState = function setPluginState(stateProps) {
|
|
17
|
-
return function (state, dispatch) {
|
|
18
|
-
var pluginState = getPluginState(state);
|
|
19
|
-
dispatch(state.tr.setMeta(_pluginKey.pluginKey, _objectSpread(_objectSpread({}, pluginState), stateProps)));
|
|
20
|
-
return true;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
exports.setPluginState = setPluginState;
|
|
11
|
+
exports.getPluginState = getPluginState;
|
|
@@ -21,10 +21,9 @@ var _initialize = require("./events/initialize");
|
|
|
21
21
|
var _pluginState = require("./plugin-state");
|
|
22
22
|
var _pluginKey = require("./plugin-key");
|
|
23
23
|
var _analytics = require("./analytics");
|
|
24
|
-
var
|
|
25
|
-
var _analytics2 = require("../analytics");
|
|
24
|
+
var _analytics2 = require("@atlaskit/editor-common/analytics");
|
|
26
25
|
var createPlugin = function createPlugin(dispatch, providerFactory, collabProviderCallback, options) {
|
|
27
|
-
var fireAnalyticsCallback = (0,
|
|
26
|
+
var fireAnalyticsCallback = (0, _analytics2.fireAnalyticsEvent)(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
|
|
28
27
|
return new _safePlugin.SafePlugin({
|
|
29
28
|
key: _pluginKey.pluginKey,
|
|
30
29
|
state: {
|
|
@@ -2,11 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "PubSubSpecialEventType", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _types.PubSubSpecialEventType;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _types = require("./types");
|
|
5
|
+
});
|
|
@@ -2,15 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PubSubSpecialEventType = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Same as PubSub client types (don't want a direct dep though)
|
|
9
|
-
*/
|
|
10
|
-
var PubSubSpecialEventType;
|
|
11
|
-
exports.PubSubSpecialEventType = PubSubSpecialEventType;
|
|
12
|
-
(function (PubSubSpecialEventType) {
|
|
13
|
-
PubSubSpecialEventType["ERROR"] = "ERROR";
|
|
14
|
-
PubSubSpecialEventType["CONNECTED"] = "CONNECTED";
|
|
15
|
-
PubSubSpecialEventType["RECONNECT"] = "RECONNECT";
|
|
16
|
-
})(PubSubSpecialEventType || (exports.PubSubSpecialEventType = PubSubSpecialEventType = {}));
|
|
5
|
+
});
|
|
@@ -4,9 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
exports.getPluginState = getPluginState;
|
|
9
|
-
exports.pluginKey = void 0;
|
|
7
|
+
exports.pluginKey = exports.default = void 0;
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
9
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
10
|
var _prosemirrorState = require("prosemirror-state");
|
|
@@ -14,9 +12,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
14
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
13
|
var pluginKey = new _prosemirrorState.PluginKey('contextPanelPluginKey');
|
|
16
14
|
exports.pluginKey = pluginKey;
|
|
17
|
-
function getPluginState(state) {
|
|
18
|
-
return pluginKey.getState(state);
|
|
19
|
-
}
|
|
20
15
|
function contextPanelPluginFactory(contextPanels, dispatch) {
|
|
21
16
|
return new _safePlugin.SafePlugin({
|
|
22
17
|
key: pluginKey,
|
|
@@ -3,16 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.createPlugin = createPlugin;
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
9
|
-
var _prosemirrorState = require("prosemirror-state");
|
|
10
|
-
var _pluginKey = require("./plugin-key");
|
|
11
|
-
function createPlugin() {
|
|
12
|
-
return new _prosemirrorState.Plugin({
|
|
13
|
-
key: _pluginKey.pluginKey
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
8
|
var dataConsumerMarkPlugin = function dataConsumerMarkPlugin() {
|
|
17
9
|
return {
|
|
18
10
|
name: 'dataConsumerPlugin',
|
|
@@ -9,7 +9,6 @@ exports.findDateSegmentByPosition = findDateSegmentByPosition;
|
|
|
9
9
|
exports.getLocaleDatePlaceholder = getLocaleDatePlaceholder;
|
|
10
10
|
exports.isDatePossiblyValid = isDatePossiblyValid;
|
|
11
11
|
exports.isToday = isToday;
|
|
12
|
-
exports.padToTwo = padToTwo;
|
|
13
12
|
var _formatParse = require("./formatParse");
|
|
14
13
|
var _addDays = _interopRequireDefault(require("date-fns/addDays"));
|
|
15
14
|
var _addMonths = _interopRequireDefault(require("date-fns/addMonths"));
|
|
@@ -17,9 +16,6 @@ var _addYears = _interopRequireDefault(require("date-fns/addYears"));
|
|
|
17
16
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
18
17
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
20
|
-
function padToTwo(number) {
|
|
21
|
-
return number <= 99 ? "0".concat(number).slice(-2) : "".concat(number);
|
|
22
|
-
}
|
|
23
19
|
function isDigit(c) {
|
|
24
20
|
if (c === undefined) {
|
|
25
21
|
return false;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.removeExtension = exports.removeDescendantNodes = exports.forceAutoSave = exports.clearEditingContext = void 0;
|
|
8
8
|
exports.setEditingContextToContextPanel = setEditingContextToContextPanel;
|
|
9
|
-
exports.updateExtensionLayout =
|
|
9
|
+
exports.updateExtensionLayout = void 0;
|
|
10
10
|
exports.updateState = updateState;
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _prosemirrorUtils = require("prosemirror-utils");
|
|
@@ -51,13 +51,6 @@ var forceAutoSave = function forceAutoSave(resolve, reject) {
|
|
|
51
51
|
}, _transforms.applyChange);
|
|
52
52
|
};
|
|
53
53
|
exports.forceAutoSave = forceAutoSave;
|
|
54
|
-
var showContextPanel = (0, _pluginFactory.createCommand)({
|
|
55
|
-
type: 'UPDATE_STATE',
|
|
56
|
-
data: {
|
|
57
|
-
showContextPanel: true
|
|
58
|
-
}
|
|
59
|
-
}, _transforms.applyChange);
|
|
60
|
-
exports.showContextPanel = showContextPanel;
|
|
61
54
|
var updateExtensionLayout = function updateExtensionLayout(layout) {
|
|
62
55
|
return (0, _pluginFactory.createCommand)({
|
|
63
56
|
type: 'UPDATE_STATE',
|
|
@@ -32,6 +32,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
32
32
|
defaultMessage: 'Delete element',
|
|
33
33
|
description: 'Title text for confirm modal when deleting an extension linked to a data consumer.'
|
|
34
34
|
},
|
|
35
|
+
unnamedSource: {
|
|
36
|
+
id: 'fabric.editor.extension.sourceNoTitledName',
|
|
37
|
+
defaultMessage: 'this element',
|
|
38
|
+
description: 'The current element without preset name been selected'
|
|
39
|
+
},
|
|
35
40
|
confirmDeleteLinkedModalOKButton: {
|
|
36
41
|
id: 'fabric.editor.extension.confirmDeleteLinkedModalOKButton',
|
|
37
42
|
defaultMessage: 'Delete',
|
|
@@ -130,11 +135,12 @@ var getToolbarConfig = function getToolbarConfig() {
|
|
|
130
135
|
var confirmDialog;
|
|
131
136
|
if ((0, _utils2.isReferencedSource)(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node)) {
|
|
132
137
|
confirmDialog = function confirmDialog() {
|
|
138
|
+
var localSourceName = formatMessage(messages.unnamedSource);
|
|
133
139
|
return {
|
|
134
140
|
title: formatMessage(messages.deleteElementTitle),
|
|
135
141
|
okButtonLabel: formatMessage(messages.confirmDeleteLinkedModalOKButton),
|
|
136
142
|
message: formatMessage(messages.confirmDeleteLinkedModalMessage, {
|
|
137
|
-
nodeName: (0, _utils2.getNodeName)(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node)
|
|
143
|
+
nodeName: (0, _utils2.getNodeName)(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node) || localSourceName
|
|
138
144
|
}),
|
|
139
145
|
isReferentialityDialog: true,
|
|
140
146
|
getChildrenInfo: function getChildrenInfo() {
|
|
@@ -19,6 +19,8 @@ var _width = require("../../../../width");
|
|
|
19
19
|
var _WithPluginState = _interopRequireDefault(require("../../../../../ui/WithPluginState"));
|
|
20
20
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
21
21
|
var _excluded = ["type"];
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
24
|
function ExtensionWithPluginState(props) {
|
|
23
25
|
var node = props.node,
|
|
24
26
|
handleContentDOMRef = props.handleContentDOMRef,
|
|
@@ -51,7 +53,10 @@ function ExtensionWithPluginState(props) {
|
|
|
51
53
|
'with-children': hasChildren,
|
|
52
54
|
'without-frame': removeBorder
|
|
53
55
|
});
|
|
54
|
-
var customContainerStyles = {
|
|
56
|
+
var customContainerStyles = {
|
|
57
|
+
width: '100%'
|
|
58
|
+
};
|
|
59
|
+
var newContentStyles = {};
|
|
55
60
|
if (shouldBreakout) {
|
|
56
61
|
var _calculateBreakoutSty = (0, _utils.calculateBreakoutStyles)({
|
|
57
62
|
mode: node.attrs.layout,
|
|
@@ -60,8 +65,10 @@ function ExtensionWithPluginState(props) {
|
|
|
60
65
|
}),
|
|
61
66
|
type = _calculateBreakoutSty.type,
|
|
62
67
|
breakoutStyles = (0, _objectWithoutProperties2.default)(_calculateBreakoutSty, _excluded);
|
|
68
|
+
newContentStyles = _objectSpread({}, breakoutStyles);
|
|
63
69
|
customContainerStyles = breakoutStyles;
|
|
64
70
|
}
|
|
71
|
+
newContentStyles = _objectSpread(_objectSpread({}, newContentStyles), _styles.contentWrapper);
|
|
65
72
|
return (0, _react2.jsx)("div", {
|
|
66
73
|
ref: handleRef,
|
|
67
74
|
"data-layout": node.attrs.layout,
|
|
@@ -80,7 +87,7 @@ function ExtensionWithPluginState(props) {
|
|
|
80
87
|
}, !removeBorder && (0, _react2.jsx)(_Lozenge.default, {
|
|
81
88
|
node: node
|
|
82
89
|
}), children), hasBody && (0, _react2.jsx)("div", {
|
|
83
|
-
css:
|
|
90
|
+
css: newContentStyles
|
|
84
91
|
}, (0, _react2.jsx)("div", {
|
|
85
92
|
css: _styles.content,
|
|
86
93
|
ref: handleContentDOMRef,
|
|
@@ -21,7 +21,7 @@ exports.wrapperStyle = wrapperStyle;
|
|
|
21
21
|
var header = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px ", "px 0px;\n vertical-align: middle;\n\n &.with-children:not(.without-frame) {\n padding: 4px 8px 8px;\n }\n &.without-frame {\n padding: 0;\n }\n"])), _styles.padding / 2, _styles.padding / 2);
|
|
22
22
|
exports.header = header;
|
|
23
23
|
var content = function content(theme) {
|
|
24
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px;\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n cursor: initial;\n"])), _styles.padding, (0, _components.themed)({
|
|
24
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px;\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n cursor: initial;\n width: 100%;\n"])), _styles.padding, (0, _components.themed)({
|
|
25
25
|
light: "var(--ds-surface, white)",
|
|
26
26
|
dark: "var(--ds-surface, ".concat(_colors.DN30, ")")
|
|
27
27
|
})(theme), (0, _components.themed)({
|
|
@@ -29,5 +29,5 @@ var content = function content(theme) {
|
|
|
29
29
|
})(theme), "var(--ds-border, ".concat(_colors.N30, ")"), (0, _constants.borderRadius)());
|
|
30
30
|
};
|
|
31
31
|
exports.content = content;
|
|
32
|
-
var contentWrapper = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 ", "px ", "px;\n"])), _styles.padding, _styles.padding);
|
|
32
|
+
var contentWrapper = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 ", "px ", "px;\n display: flex;\n justify-content: center;\n"])), _styles.padding, _styles.padding);
|
|
33
33
|
exports.contentWrapper = contentWrapper;
|
|
@@ -77,6 +77,7 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
77
77
|
var title = parameters && parameters.extensionTitle || parameters && parameters.macroMetadata && parameters.macroMetadata.title || extensionKey;
|
|
78
78
|
var isBlockExtension = name === 'extension';
|
|
79
79
|
return (0, _react.jsx)("div", {
|
|
80
|
+
"data-testid": "lozenge-fallback",
|
|
80
81
|
css: _styles.placeholderFallback
|
|
81
82
|
}, lozengeData && !isBlockExtension ? this.renderImage(_objectSpread({
|
|
82
83
|
height: ICON_SIZE,
|
|
@@ -4,13 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.openFeedbackDialog = exports.default = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
var _prosemirrorState = require("prosemirror-state");
|
|
14
13
|
var _assets = require("../quick-insert/assets");
|
|
15
14
|
var _versionWrapper = require("../../version-wrapper");
|
|
16
15
|
var _analytics = require("../analytics");
|
|
@@ -18,8 +17,6 @@ var _loadJiraCollectorDialogScript = _interopRequireDefault(require("./loadJiraC
|
|
|
18
17
|
var _messages = require("../insert-block/ui/ToolbarInsertBlock/messages");
|
|
19
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
19
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
var pluginKey = new _prosemirrorState.PluginKey('feedbackDialogPlugin');
|
|
22
|
-
exports.pluginKey = pluginKey;
|
|
23
20
|
var showJiraCollectorDialog;
|
|
24
21
|
var feedbackInfoHash;
|
|
25
22
|
var defaultFeedbackInfo;
|
|
@@ -26,6 +26,7 @@ var _FindReplace = _interopRequireDefault(require("./FindReplace"));
|
|
|
26
26
|
var _types = require("../../analytics/types");
|
|
27
27
|
var _keymaps = require("../../../keymaps");
|
|
28
28
|
var _keymaps2 = require("@atlaskit/editor-common/keymaps");
|
|
29
|
+
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
29
30
|
var _templateObject, _templateObject2, _templateObject3;
|
|
30
31
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -97,7 +98,10 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
97
98
|
},
|
|
98
99
|
fitWidth: 352,
|
|
99
100
|
zIndex: stackBelowOtherEditorFloatingPanels,
|
|
100
|
-
|
|
101
|
+
arrowKeyNavigationProviderOptions: {
|
|
102
|
+
type: _uiMenu.ArrowKeyNavigationType.MENU,
|
|
103
|
+
disableArrowKeyNavigation: true
|
|
104
|
+
},
|
|
101
105
|
trigger: (0, _react2.jsx)(_ToolbarButton.default, {
|
|
102
106
|
buttonId: _ToolbarButton.TOOLBAR_BUTTON.FIND_REPLACE,
|
|
103
107
|
spacing: isReducedSpacing ? 'none' : 'default',
|