@atlaskit/editor-core 180.1.0 → 181.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/cjs/actions/index.js +25 -10
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +0 -5
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +73 -103
- package/dist/cjs/create-editor/create-plugins-list.js +37 -5
- package/dist/cjs/create-editor/feature-flags-from-props.js +31 -26
- package/dist/cjs/create-editor/preset-utils.js +27 -0
- package/dist/cjs/editor-next/editor-internal.js +2 -2
- package/dist/cjs/editor-next/editor-migration-component.js +18 -2
- package/dist/cjs/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/cjs/editor-next/index.js +13 -9
- package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
- package/dist/cjs/editor-next/utils/handleProviders.js +17 -22
- package/dist/cjs/editor.js +20 -13
- package/dist/cjs/keymaps/consts.js +1 -16
- 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 +330 -257
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
- package/dist/cjs/plugins/analytics/plugin.js +6 -0
- package/dist/cjs/plugins/annotation/utils.js +2 -36
- package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
- package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
- package/dist/cjs/plugins/caption/index.js +0 -7
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +6 -3
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
- 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/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/floating-toolbar/ui/Button.js +7 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
- package/dist/cjs/plugins/fragment/index.js +0 -8
- package/dist/cjs/plugins/help-dialog/commands.js +2 -6
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
- 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/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/paste/index.js +1 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +123 -87
- package/dist/cjs/plugins/paste/util/index.js +0 -46
- 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/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 +7 -5
- package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/cjs/plugins/text-formatting/utils.js +1 -26
- package/dist/cjs/plugins/type-ahead/constants.js +1 -7
- package/dist/cjs/plugins/type-ahead/index.js +4 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +6 -37
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/cjs/plugins/type-ahead/utils.js +25 -24
- package/dist/cjs/test-utils.js +4 -12
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
- package/dist/cjs/ui/ColorPalette/index.js +18 -0
- package/dist/cjs/ui/ColorPickerButton/index.js +6 -2
- 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/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
- package/dist/cjs/ui/Resizer/utils.js +1 -3
- package/dist/cjs/ui/styles.js +3 -7
- package/dist/cjs/utils/get-editor-plugins.js +1 -3
- package/dist/cjs/utils/index.js +9 -269
- package/dist/cjs/utils/input-rules.js +1 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +23 -9
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +0 -5
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +67 -82
- package/dist/es2019/create-editor/create-plugins-list.js +32 -5
- package/dist/es2019/create-editor/feature-flags-from-props.js +31 -26
- package/dist/es2019/create-editor/preset-utils.js +15 -0
- package/dist/es2019/editor-next/editor-internal.js +2 -2
- package/dist/es2019/editor-next/editor-migration-component.js +19 -2
- package/dist/es2019/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/es2019/editor-next/index.js +13 -7
- package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
- package/dist/es2019/editor-next/utils/handleProviders.js +18 -24
- package/dist/es2019/editor.js +20 -11
- package/dist/es2019/keymaps/consts.js +7 -11
- 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 +338 -265
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
- package/dist/es2019/plugins/analytics/plugin.js +7 -0
- package/dist/es2019/plugins/annotation/utils.js +2 -30
- package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
- package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/es2019/plugins/caption/index.js +0 -2
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -4
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/es2019/plugins/card/pm-plugins/main.js +6 -3
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
- 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/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/floating-toolbar/ui/Button.js +7 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +21 -4
- package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
- package/dist/es2019/plugins/fragment/index.js +0 -7
- package/dist/es2019/plugins/help-dialog/commands.js +1 -2
- package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
- 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/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/paste/index.js +1 -2
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +126 -94
- package/dist/es2019/plugins/paste/util/index.js +5 -45
- 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/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 +7 -5
- package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/es2019/plugins/text-formatting/utils.js +0 -19
- package/dist/es2019/plugins/type-ahead/constants.js +0 -5
- package/dist/es2019/plugins/type-ahead/index.js +4 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +4 -37
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/es2019/plugins/type-ahead/utils.js +22 -25
- package/dist/es2019/test-utils.js +4 -7
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
- package/dist/es2019/ui/ColorPalette/index.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +6 -2
- 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/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/es2019/ui/styles.js +0 -6
- package/dist/es2019/utils/get-editor-plugins.js +1 -3
- package/dist/es2019/utils/index.js +13 -199
- package/dist/es2019/utils/input-rules.js +0 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +23 -9
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +0 -5
- package/dist/esm/create-editor/ReactEditorViewInternal.js +73 -102
- package/dist/esm/create-editor/create-plugins-list.js +36 -5
- package/dist/esm/create-editor/feature-flags-from-props.js +31 -26
- package/dist/esm/create-editor/preset-utils.js +21 -0
- package/dist/esm/editor-next/editor-internal.js +2 -2
- package/dist/esm/editor-next/editor-migration-component.js +18 -2
- package/dist/esm/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/esm/editor-next/index.js +13 -9
- package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
- package/dist/esm/editor-next/utils/handleProviders.js +17 -22
- package/dist/esm/editor.js +20 -13
- package/dist/esm/keymaps/consts.js +7 -11
- 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 +330 -257
- package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
- package/dist/esm/plugins/analytics/plugin.js +6 -0
- package/dist/esm/plugins/annotation/utils.js +2 -32
- package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
- package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/esm/plugins/caption/index.js +0 -2
- package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/esm/plugins/card/pm-plugins/main.js +6 -3
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
- 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/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/floating-toolbar/ui/Button.js +7 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
- package/dist/esm/plugins/fragment/index.js +0 -7
- package/dist/esm/plugins/help-dialog/commands.js +0 -3
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
- 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/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/paste/index.js +1 -2
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +122 -86
- package/dist/esm/plugins/paste/util/index.js +5 -45
- 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/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 +7 -5
- package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/esm/plugins/text-formatting/utils.js +0 -21
- package/dist/esm/plugins/type-ahead/constants.js +0 -5
- package/dist/esm/plugins/type-ahead/index.js +4 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +4 -33
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/esm/plugins/type-ahead/utils.js +24 -22
- package/dist/esm/test-utils.js +4 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
- package/dist/esm/ui/ColorPalette/index.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +6 -2
- 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/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/esm/ui/styles.js +2 -5
- package/dist/esm/utils/get-editor-plugins.js +1 -3
- package/dist/esm/utils/index.js +13 -196
- package/dist/esm/utils/input-rules.js +0 -13
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +4 -4
- package/dist/types/create-editor/ReactEditorView.d.ts +0 -3
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +9 -7
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +3 -4
- 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 +9 -9
- package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +2 -2
- package/dist/types/editor-next/hooks/useProviderFactory.d.ts +2 -2
- package/dist/types/editor-next/index.d.ts +6 -6
- package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -2
- package/dist/types/editor-next/utils/editorPropTypes.d.ts +1 -1
- package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
- package/dist/types/editor-next/utils/handleProviders.d.ts +2 -2
- package/dist/types/editor-next/utils/onEditorCreated.d.ts +2 -2
- package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +1 -1
- package/dist/types/editor.d.ts +7 -4
- package/dist/types/keymaps/consts.d.ts +0 -11
- 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/pm-plugins/types.d.ts +0 -11
- package/dist/types/plugins/annotation/utils.d.ts +0 -17
- package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
- package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
- package/dist/types/plugins/caption/index.d.ts +0 -2
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +1 -0
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +0 -4
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
- 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 +2 -3
- 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/extension/commands.d.ts +0 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
- package/dist/types/plugins/feedback-dialog/index.d.ts +0 -2
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
- 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/help-dialog/commands.d.ts +0 -1
- package/dist/types/plugins/history/actions.d.ts +1 -2
- package/dist/types/plugins/layout/styles.d.ts +2 -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/media/utils/media-common.d.ts +0 -5
- 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/paste/index.d.ts +0 -1
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +6 -3
- package/dist/types/plugins/paste/util/index.d.ts +0 -6
- package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
- package/dist/types/plugins/status/utils.d.ts +0 -3
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -4
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
- package/dist/types/plugins/type-ahead/index.d.ts +1 -0
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +2 -11
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +3 -3
- 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/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 +3 -3
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
- 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 +4 -2
- 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/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/Resizer/utils.d.ts +0 -1
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/index.d.ts +6 -65
- package/dist/types/utils/input-rules.d.ts +1 -2
- package/dist/types/utils/table.d.ts +0 -1
- package/package.json +23 -24
- package/report.api.md +155 -146
- package/dist/cjs/labs/next/presets/preset.js +0 -101
- package/dist/cjs/plugins/analytics/types/type-ahead.js +0 -5
- 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 -68
- package/dist/es2019/plugins/analytics/types/type-ahead.js +0 -1
- 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/es2019/ui/WithPluginState/types.js +0 -1
- package/dist/esm/labs/next/presets/preset.js +0 -93
- 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/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
|
@@ -2,11 +2,6 @@ export var TYPE_AHEAD_DECORATION_KEY = 'typeahead_decoration_key';
|
|
|
2
2
|
export var TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = 'typeaheadDecoration';
|
|
3
3
|
export var TYPE_AHEAD_POPUP_CONTENT_CLASS = 'fabric-editor-typeahead';
|
|
4
4
|
export var TYPE_AHEAD_DECORATION_ELEMENT_ID = 'typeahaed_decoration_element_id';
|
|
5
|
-
export var NavigationDirection;
|
|
6
|
-
(function (NavigationDirection) {
|
|
7
|
-
NavigationDirection[NavigationDirection["LEFT"] = -1] = "LEFT";
|
|
8
|
-
NavigationDirection[NavigationDirection["RIGHT"] = 1] = "RIGHT";
|
|
9
|
-
})(NavigationDirection || (NavigationDirection = {}));
|
|
10
5
|
export var CloseSelectionOptions;
|
|
11
6
|
(function (CloseSelectionOptions) {
|
|
12
7
|
CloseSelectionOptions["BEFORE_TEXT_INSERTED"] = "BEFORE_TEXT_INSERTED";
|
|
@@ -113,6 +113,8 @@ var TypeAheadMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
113
113
|
*
|
|
114
114
|
*/
|
|
115
115
|
var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
116
|
+
var _options$useBetterTyp;
|
|
117
|
+
var useBetterTypeaheadNavigation = (_options$useBetterTyp = options === null || options === void 0 ? void 0 : options.useBetterTypeaheadNavigation) !== null && _options$useBetterTyp !== void 0 ? _options$useBetterTyp : true;
|
|
116
118
|
var fireAnalyticsCallback = fireAnalyticsEvent(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
|
|
117
119
|
var popupMountRef = {
|
|
118
120
|
current: null
|
|
@@ -139,7 +141,8 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
139
141
|
popupMountRef: popupMountRef,
|
|
140
142
|
reactDispatch: dispatch,
|
|
141
143
|
typeAheadHandlers: typeAhead,
|
|
142
|
-
createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent
|
|
144
|
+
createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent,
|
|
145
|
+
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
143
146
|
});
|
|
144
147
|
}
|
|
145
148
|
}, {
|
|
@@ -15,7 +15,8 @@ import { closeTypeAhead } from '../transforms/close-type-ahead';
|
|
|
15
15
|
export var factoryDecorations = function factoryDecorations(_ref) {
|
|
16
16
|
var intl = _ref.intl,
|
|
17
17
|
popupMountRef = _ref.popupMountRef,
|
|
18
|
-
createAnalyticsEvent = _ref.createAnalyticsEvent
|
|
18
|
+
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
19
|
+
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
19
20
|
var createDecorations = function createDecorations(tr, _ref2) {
|
|
20
21
|
var triggerHandler = _ref2.triggerHandler,
|
|
21
22
|
inputMethod = _ref2.inputMethod,
|
|
@@ -87,7 +88,8 @@ export var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
87
88
|
popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
|
|
88
89
|
popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
|
|
89
90
|
onUndoRedo: onUndoRedo,
|
|
90
|
-
reopenQuery: reopenQuery
|
|
91
|
+
reopenQuery: reopenQuery,
|
|
92
|
+
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
91
93
|
})), typeaheadComponent);
|
|
92
94
|
shouldFocusCursorInsideQuery = false;
|
|
93
95
|
return typeaheadComponent;
|
|
@@ -138,35 +140,4 @@ export var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
138
140
|
createDecorations: createDecorations,
|
|
139
141
|
removeDecorations: removeDecorations
|
|
140
142
|
};
|
|
141
|
-
};
|
|
142
|
-
export var isSelectionInsideTypeAhead = function isSelectionInsideTypeAhead(_ref4) {
|
|
143
|
-
var decorationSet = _ref4.decorationSet,
|
|
144
|
-
selection = _ref4.selection;
|
|
145
|
-
if (!decorationSet || decorationSet === DecorationSet.empty) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
var typeAheadDecorations = decorationSet.find(undefined, undefined, function (spec) {
|
|
149
|
-
return spec.isTypeAheadDecoration;
|
|
150
|
-
});
|
|
151
|
-
if (!typeAheadDecorations || typeAheadDecorations.length === 0) {
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
return typeAheadDecorations.some(function (dec) {
|
|
155
|
-
return dec.from === selection.from && dec.to === selection.to;
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
export var findDecorationElement = function findDecorationElement(_ref5) {
|
|
159
|
-
var selection = _ref5.selection,
|
|
160
|
-
decorationSet = _ref5.decorationSet;
|
|
161
|
-
if (!decorationSet || decorationSet === DecorationSet.empty || !(selection instanceof TextSelection) || !selection.$cursor) {
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
164
|
-
var pos = selection.$cursor.pos;
|
|
165
|
-
var decoration = decorationSet.find(pos, pos, function (spec) {
|
|
166
|
-
return spec === null || spec === void 0 ? void 0 : spec.isTypeAheadDecoration;
|
|
167
|
-
});
|
|
168
|
-
if (!decoration || decoration.length !== 1) {
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
return document.querySelector("#".concat(decoration[0].spec.key));
|
|
172
143
|
};
|
|
@@ -25,12 +25,14 @@ export function createPlugin(_ref) {
|
|
|
25
25
|
popupMountRef = _ref.popupMountRef,
|
|
26
26
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
27
27
|
typeAheadHandlers = _ref.typeAheadHandlers,
|
|
28
|
-
getIntl = _ref.getIntl
|
|
28
|
+
getIntl = _ref.getIntl,
|
|
29
|
+
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
29
30
|
var intl = getIntl();
|
|
30
31
|
var _factoryDecorations = factoryDecorations({
|
|
31
32
|
intl: intl,
|
|
32
33
|
popupMountRef: popupMountRef,
|
|
33
|
-
createAnalyticsEvent: createAnalyticsEvent
|
|
34
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
35
|
+
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
34
36
|
}),
|
|
35
37
|
createDecorations = _factoryDecorations.createDecorations,
|
|
36
38
|
removeDecorations = _factoryDecorations.removeDecorations;
|
|
@@ -66,7 +66,8 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
66
66
|
onQueryFocus = _ref.onQueryFocus,
|
|
67
67
|
onUndoRedo = _ref.onUndoRedo,
|
|
68
68
|
editorView = _ref.editorView,
|
|
69
|
-
items = _ref.items
|
|
69
|
+
items = _ref.items,
|
|
70
|
+
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
70
71
|
var ref = useRef(document.createElement('span'));
|
|
71
72
|
var inputRef = useRef(null);
|
|
72
73
|
var _useState = useState(null),
|
|
@@ -139,6 +140,19 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
139
140
|
// Some suggested the other workaround maybe listen on`keypress` instead of `keydown`
|
|
140
141
|
if (!event.isComposing || event.which !== 229 && event.keyCode !== 229) {
|
|
141
142
|
if (selectedIndex === -1) {
|
|
143
|
+
if (useBetterTypeaheadNavigation) {
|
|
144
|
+
/**
|
|
145
|
+
* TODO DTR-1401: (also see ED-17200) There are two options
|
|
146
|
+
* here, either
|
|
147
|
+
* - set the index directly to 1 in WrapperTypeAhead.tsx's
|
|
148
|
+
* `insertSelectedItem` at the cost of breaking some of the a11y
|
|
149
|
+
* focus changes,
|
|
150
|
+
* - or do this jank at the cost of some small analytics noise.
|
|
151
|
+
*
|
|
152
|
+
* The focus behaviour still needs cleanup
|
|
153
|
+
*/
|
|
154
|
+
selectPreviousItem();
|
|
155
|
+
}
|
|
142
156
|
selectNextItem();
|
|
143
157
|
}
|
|
144
158
|
onItemSelect(event.shiftKey ? SelectItemMode.SHIFT_ENTER : SelectItemMode.ENTER);
|
|
@@ -146,18 +160,41 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
146
160
|
break;
|
|
147
161
|
case 'Tab':
|
|
148
162
|
if (selectedIndex === -1) {
|
|
163
|
+
if (useBetterTypeaheadNavigation) {
|
|
164
|
+
/**
|
|
165
|
+
* TODO DTR-1401: (also see ED-17200) There are two options
|
|
166
|
+
* here, either
|
|
167
|
+
* - set the index directly to 1 in WrapperTypeAhead.tsx's
|
|
168
|
+
* `insertSelectedItem` at the cost of breaking some of the a11y
|
|
169
|
+
* focus changes,
|
|
170
|
+
* - or do this jank at the cost of some small analytics noise.
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
selectPreviousItem();
|
|
174
|
+
}
|
|
149
175
|
selectNextItem();
|
|
150
176
|
}
|
|
177
|
+
// TODO DTR-1401: why is this calling select item when hitting tab? fix this in DTR-1401
|
|
151
178
|
onItemSelect(SelectItemMode.TAB);
|
|
152
179
|
break;
|
|
153
180
|
case 'ArrowDown':
|
|
154
|
-
if (
|
|
181
|
+
if (useBetterTypeaheadNavigation) {
|
|
155
182
|
selectNextItem();
|
|
183
|
+
} else {
|
|
184
|
+
// TODO DTR-1401: why were we preventing selection?
|
|
185
|
+
if (selectedIndex === -1) {
|
|
186
|
+
selectNextItem();
|
|
187
|
+
}
|
|
156
188
|
}
|
|
157
189
|
break;
|
|
158
190
|
case 'ArrowUp':
|
|
159
|
-
if (
|
|
191
|
+
if (useBetterTypeaheadNavigation) {
|
|
160
192
|
selectPreviousItem();
|
|
193
|
+
} else {
|
|
194
|
+
// TODO DTR-1401: why were we preventing selection?
|
|
195
|
+
if (selectedIndex === -1) {
|
|
196
|
+
selectPreviousItem();
|
|
197
|
+
}
|
|
161
198
|
}
|
|
162
199
|
break;
|
|
163
200
|
}
|
|
@@ -170,7 +207,7 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
170
207
|
event.preventDefault();
|
|
171
208
|
return false;
|
|
172
209
|
}
|
|
173
|
-
}, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state]);
|
|
210
|
+
}, [useBetterTypeaheadNavigation, onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state]);
|
|
174
211
|
var onClick = useCallback(function (event) {
|
|
175
212
|
var _inputRef$current;
|
|
176
213
|
event.stopPropagation();
|
|
@@ -176,6 +176,8 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
176
176
|
selectPreviousItem();
|
|
177
177
|
event.preventDefault();
|
|
178
178
|
break;
|
|
179
|
+
|
|
180
|
+
// TODO DTR-1401: why is this calling item click when hitting tab? fix this in DTR-1401
|
|
179
181
|
case 'Tab':
|
|
180
182
|
//Tab key quick inserts the selected item.
|
|
181
183
|
onItemClick(SelectItemMode.TAB, selectedIndex);
|
|
@@ -19,7 +19,8 @@ export var WrapperTypeAhead = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
19
19
|
inputMethod = _ref.inputMethod,
|
|
20
20
|
getDecorationPosition = _ref.getDecorationPosition,
|
|
21
21
|
reopenQuery = _ref.reopenQuery,
|
|
22
|
-
onUndoRedo = _ref.onUndoRedo
|
|
22
|
+
onUndoRedo = _ref.onUndoRedo,
|
|
23
|
+
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
23
24
|
var _useState = useState(false),
|
|
24
25
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
26
|
closed = _useState2[0],
|
|
@@ -41,15 +42,17 @@ export var WrapperTypeAhead = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
41
42
|
var selectNextItem = useMemo(function () {
|
|
42
43
|
return moveSelectedIndex({
|
|
43
44
|
editorView: editorView,
|
|
44
|
-
direction: 'next'
|
|
45
|
+
direction: 'next',
|
|
46
|
+
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
45
47
|
});
|
|
46
|
-
}, [editorView]);
|
|
48
|
+
}, [editorView, useBetterTypeaheadNavigation]);
|
|
47
49
|
var selectPreviousItem = useMemo(function () {
|
|
48
50
|
return moveSelectedIndex({
|
|
49
51
|
editorView: editorView,
|
|
50
|
-
direction: 'previous'
|
|
52
|
+
direction: 'previous',
|
|
53
|
+
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
51
54
|
});
|
|
52
|
-
}, [editorView]);
|
|
55
|
+
}, [editorView, useBetterTypeaheadNavigation]);
|
|
53
56
|
var cancel = useCallback(function (_ref2) {
|
|
54
57
|
var setSelectionAt = _ref2.setSelectionAt,
|
|
55
58
|
addPrefixTrigger = _ref2.addPrefixTrigger,
|
|
@@ -100,6 +103,7 @@ export var WrapperTypeAhead = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
100
103
|
return null;
|
|
101
104
|
}
|
|
102
105
|
return /*#__PURE__*/React.createElement(InputQuery, {
|
|
106
|
+
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation,
|
|
103
107
|
triggerQueryPrefix: triggerHandler.trigger,
|
|
104
108
|
onQueryChange: setQuery,
|
|
105
109
|
onItemSelect: insertSelectedItem,
|
|
@@ -1,34 +1,16 @@
|
|
|
1
|
-
import { TextSelection } from 'prosemirror-state';
|
|
2
|
-
import { DecorationSet } from 'prosemirror-view';
|
|
3
1
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
4
2
|
import { pluginKey as typeAheadPluginKey } from './pm-plugins/key';
|
|
5
3
|
import { updateSelectedIndex } from './commands/update-selected-index';
|
|
6
4
|
import { StatsModifier } from './stats-modifier';
|
|
7
5
|
import { typeAheadListMessages } from './messages';
|
|
8
|
-
export var findTypeAheadDecorations = function findTypeAheadDecorations(state) {
|
|
9
|
-
var selection = state.selection;
|
|
10
|
-
var _typeAheadPluginKey$g = typeAheadPluginKey.getState(state),
|
|
11
|
-
decorationSet = _typeAheadPluginKey$g.decorationSet;
|
|
12
|
-
if (!decorationSet || decorationSet === DecorationSet.empty || !(selection instanceof TextSelection) || !selection.$cursor) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
var pos = selection.$cursor.pos;
|
|
16
|
-
var decoration = decorationSet.find(pos, pos, function (spec) {
|
|
17
|
-
return spec === null || spec === void 0 ? void 0 : spec.isTypeAheadDecoration;
|
|
18
|
-
});
|
|
19
|
-
if (!decoration || decoration.length !== 1) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
return decoration[0];
|
|
23
|
-
};
|
|
24
6
|
export var isTypeAheadHandler = function isTypeAheadHandler(handler) {
|
|
25
7
|
return handler && Object.values(TypeAheadAvailableNodes).includes(handler.id) && typeof handler.trigger === 'string' && typeof handler.selectItem === 'function' && typeof handler.getItems === 'function';
|
|
26
8
|
};
|
|
27
9
|
|
|
28
10
|
/** Is a typeahead plugin open? */
|
|
29
11
|
export var isTypeAheadOpen = function isTypeAheadOpen(editorState) {
|
|
30
|
-
var _typeAheadPluginKey$
|
|
31
|
-
return (typeAheadPluginKey === null || typeAheadPluginKey === void 0 ? void 0 : (_typeAheadPluginKey$
|
|
12
|
+
var _typeAheadPluginKey$g, _typeAheadPluginKey$g2;
|
|
13
|
+
return (typeAheadPluginKey === null || typeAheadPluginKey === void 0 ? void 0 : (_typeAheadPluginKey$g = typeAheadPluginKey.getState(editorState)) === null || _typeAheadPluginKey$g === void 0 ? void 0 : (_typeAheadPluginKey$g2 = _typeAheadPluginKey$g.decorationSet) === null || _typeAheadPluginKey$g2 === void 0 ? void 0 : _typeAheadPluginKey$g2.find().length) > 0;
|
|
32
14
|
};
|
|
33
15
|
export var getPluginState = function getPluginState(editorState) {
|
|
34
16
|
return typeAheadPluginKey.getState(editorState);
|
|
@@ -69,7 +51,8 @@ export var findHandlerByTrigger = function findHandlerByTrigger(_ref) {
|
|
|
69
51
|
};
|
|
70
52
|
export var moveSelectedIndex = function moveSelectedIndex(_ref2) {
|
|
71
53
|
var editorView = _ref2.editorView,
|
|
72
|
-
direction = _ref2.direction
|
|
54
|
+
direction = _ref2.direction,
|
|
55
|
+
useBetterTypeaheadNavigation = _ref2.useBetterTypeaheadNavigation;
|
|
73
56
|
return function () {
|
|
74
57
|
var typeAheadState = getPluginState(editorView.state);
|
|
75
58
|
if (!typeAheadState) {
|
|
@@ -81,7 +64,26 @@ export var moveSelectedIndex = function moveSelectedIndex(_ref2) {
|
|
|
81
64
|
var nextIndex;
|
|
82
65
|
if (direction === 'next') {
|
|
83
66
|
stats.increaseArrowDown();
|
|
84
|
-
|
|
67
|
+
if (useBetterTypeaheadNavigation) {
|
|
68
|
+
/**
|
|
69
|
+
* See: https://product-fabric.atlassian.net/browse/ED-17200
|
|
70
|
+
* `selectedIndex` is forced to -1 now to not immediately focus the typeahead
|
|
71
|
+
* and only do so when there is explicit logic to focus into the typeahead
|
|
72
|
+
* options.
|
|
73
|
+
*
|
|
74
|
+
* This check for "set index to 1 when -1"
|
|
75
|
+
* - is a temporary workaround to get back the previous behaviour without
|
|
76
|
+
* entirely reverting the a11y improvements
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
if (selectedIndex === -1 && items.length > 1) {
|
|
80
|
+
nextIndex = 1;
|
|
81
|
+
} else {
|
|
82
|
+
nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
|
|
86
|
+
}
|
|
85
87
|
} else {
|
|
86
88
|
stats.increaseArrowUp();
|
|
87
89
|
nextIndex = selectedIndex <= 0 ? items.length - 1 : selectedIndex - 1;
|
package/dist/esm/test-utils.js
CHANGED
|
@@ -4,12 +4,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
4
4
|
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) { _defineProperty(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; }
|
|
5
5
|
import { TextSelection } from 'prosemirror-state';
|
|
6
6
|
import { sortByOrder } from './create-editor/sort-by-order';
|
|
7
|
-
import { Preset } from './labs/next/presets/preset';
|
|
8
7
|
import { createSchema } from './create-editor/create-schema';
|
|
9
8
|
import basePlugin from './plugins/base';
|
|
10
9
|
import { analyticsPluginKey } from './plugins/analytics/plugin-key';
|
|
11
10
|
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
12
|
-
|
|
11
|
+
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
13
12
|
export function getFireAnalytics(editorView) {
|
|
14
13
|
var _analyticsPluginKey$g;
|
|
15
14
|
return analyticsPluginKey === null || analyticsPluginKey === void 0 ? void 0 : (_analyticsPluginKey$g = analyticsPluginKey.getState(editorView.state)) === null || _analyticsPluginKey$g === void 0 ? void 0 : _analyticsPluginKey$g.fireAnalytics;
|
|
@@ -58,13 +57,11 @@ function lightProcessPluginsList(editorPlugins) {
|
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
59
|
export var createPMSchemaAndPlugins = function createPMSchemaAndPlugins() {
|
|
61
|
-
var
|
|
60
|
+
var inputPreset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new EditorPresetBuilder();
|
|
62
61
|
return function (pluginFactoryParams) {
|
|
63
62
|
var editorPlugins = [];
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
editorPlugins = preset.getEditorPlugins();
|
|
63
|
+
var preset = inputPreset.has(basePlugin) ? inputPreset : inputPreset.add(basePlugin);
|
|
64
|
+
editorPlugins = preset.build();
|
|
68
65
|
var editorConfig = lightProcessPluginsList(editorPlugins);
|
|
69
66
|
var schema = createSchema(editorConfig);
|
|
70
67
|
var plugins = editorConfig.plugins.sort(sortByOrder('plugins')).map(function (_ref) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
@@ -15,10 +16,18 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
15
16
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16
17
|
top = _useState2[0],
|
|
17
18
|
setTop = _useState2[1];
|
|
19
|
+
|
|
20
|
+
// ED-15802: if externalToolbarRef is passed in, set top to externalToolbarRef?.current?.clientHeight
|
|
21
|
+
// else if offsetTop is a number set top to offsetTop
|
|
22
|
+
// otherwise top is 0 as initial state
|
|
18
23
|
useEffect(function () {
|
|
19
24
|
var _props$externalToolba, _props$externalToolba2;
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
if ((_props$externalToolba = props.externalToolbarRef) !== null && _props$externalToolba !== void 0 && (_props$externalToolba2 = _props$externalToolba.current) !== null && _props$externalToolba2 !== void 0 && _props$externalToolba2.clientHeight) {
|
|
26
|
+
setTop(props.externalToolbarRef.current.clientHeight);
|
|
27
|
+
} else {
|
|
28
|
+
setTop(props.offsetTop || 0);
|
|
29
|
+
}
|
|
30
|
+
}, [props.externalToolbarRef, props.offsetTop]);
|
|
22
31
|
return jsx("div", {
|
|
23
32
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n "])), top)],
|
|
24
33
|
"data-testid": "ak-editor-main-toolbar",
|
|
@@ -31,13 +40,39 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
31
40
|
"data-testid": "ak-editor-main-toolbar"
|
|
32
41
|
}, props.children);
|
|
33
42
|
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* ED-15802: Scenarios when a sticky bar is used:
|
|
46
|
+
* 1. useStickyToolbar is true
|
|
47
|
+
* 2. useStickyToolbar is a DOM element
|
|
48
|
+
* 3. useStickyToolbar is an object and has offsetTop key;
|
|
49
|
+
*/
|
|
50
|
+
var getStickyParameters = function getStickyParameters(configuration) {
|
|
51
|
+
// const isUsingStickyOffset, isHTMLElement is used so TS can properly infer types.
|
|
52
|
+
var isHTMLElement = _typeof(configuration) === 'object' && !('offsetTop' in configuration);
|
|
53
|
+
var isUsingStickyOffset = _typeof(configuration) === 'object' && 'offsetTop' in configuration;
|
|
54
|
+
if (_typeof(configuration) !== 'object') {
|
|
55
|
+
return {
|
|
56
|
+
externalToolbarRef: undefined,
|
|
57
|
+
offsetTop: undefined
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (isUsingStickyOffset) {
|
|
61
|
+
return {
|
|
62
|
+
offsetTop: configuration.offsetTop
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (isHTMLElement) {
|
|
66
|
+
return {
|
|
67
|
+
externalToolbarRef: configuration
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
};
|
|
34
71
|
export var MainToolbar = function MainToolbar(_ref) {
|
|
35
72
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
36
73
|
children = _ref.children;
|
|
37
|
-
if (
|
|
38
|
-
return jsx(StickyToolbar,
|
|
39
|
-
externalToolbarRef: typeof useStickyToolbar === 'boolean' ? undefined : useStickyToolbar
|
|
40
|
-
}, children);
|
|
74
|
+
if (useStickyToolbar) {
|
|
75
|
+
return jsx(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
41
76
|
}
|
|
42
77
|
return jsx(FixedToolbar, null, children);
|
|
43
78
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { ColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
1
|
+
import { ColorPalette, backgroundPaletteTooltipMessages, textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
2
|
+
export { ColorPalette, backgroundPaletteTooltipMessages, textPaletteTooltipMessages };
|
|
2
3
|
export default ColorPalette;
|
|
@@ -137,13 +137,17 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
137
137
|
isOpenedByKeyboard: isOpenedByKeyboard,
|
|
138
138
|
isPopupPositioned: isPopupPositioned
|
|
139
139
|
}, jsx(ColorPaletteWithListeners, {
|
|
140
|
-
palette: props.colorPalette,
|
|
141
140
|
cols: props.cols,
|
|
142
141
|
selectedColor: selectedColor,
|
|
143
142
|
onClick: onColorSelected,
|
|
144
143
|
handleClickOutside: togglePopup,
|
|
145
144
|
handleEscapeKeydown: handleEsc,
|
|
146
|
-
|
|
145
|
+
paletteOptions: {
|
|
146
|
+
palette: props.colorPalette,
|
|
147
|
+
hexToPaletteColor: props.hexToPaletteColor,
|
|
148
|
+
showSomewhatSemanticTooltips: props.showSomewhatSemanticTooltips,
|
|
149
|
+
paletteColorTooltipMessages: props.paletteColorTooltipMessages
|
|
150
|
+
}
|
|
147
151
|
}))));
|
|
148
152
|
};
|
|
149
153
|
var title = props.title || '';
|
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
1
|
import { ValidationError } from './types';
|
|
4
2
|
export var validate = function validate(field, value) {
|
|
5
3
|
return validateRequired(field, value);
|
|
6
4
|
};
|
|
7
|
-
export var fromEntries = function fromEntries(iterable) {
|
|
8
|
-
return _toConsumableArray(iterable).reduce(function (obj, _ref) {
|
|
9
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
10
|
-
key = _ref2[0],
|
|
11
|
-
val = _ref2[1];
|
|
12
|
-
obj[key] = val;
|
|
13
|
-
return obj;
|
|
14
|
-
}, {});
|
|
15
|
-
};
|
|
16
5
|
var isEmptyString = function isEmptyString(value) {
|
|
17
6
|
return typeof value === 'string' && value === '';
|
|
18
7
|
};
|
|
19
8
|
var isEmptyArray = function isEmptyArray(value) {
|
|
20
9
|
return Array.isArray(value) && value.length === 0;
|
|
21
10
|
};
|
|
22
|
-
export var validateRequired = function validateRequired(
|
|
23
|
-
var isRequired =
|
|
24
|
-
isMultiple =
|
|
11
|
+
export var validateRequired = function validateRequired(_ref, value) {
|
|
12
|
+
var isRequired = _ref.isRequired,
|
|
13
|
+
isMultiple = _ref.isMultiple;
|
|
25
14
|
if (isRequired) {
|
|
26
15
|
var isUndefined = typeof value === 'undefined';
|
|
27
16
|
var isEmpty = isEmptyString(value) || isMultiple && isEmptyArray(value) || false;
|
|
@@ -38,7 +38,7 @@ import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewPro
|
|
|
38
38
|
var contentStyles = function contentStyles(props) {
|
|
39
39
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
40
40
|
theme: props.theme
|
|
41
|
-
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
41
|
+
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles(props), telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
42
42
|
};
|
|
43
43
|
export var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
44
44
|
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -14,7 +14,6 @@ export var SIDEBAR_WIDTH = "".concat(GRID_SIZE * 25, "px");
|
|
|
14
14
|
export var SIDEBAR_HEADING_WRAPPER_HEIGHT = "".concat(GRID_SIZE * 6, "px");
|
|
15
15
|
export var SIDEBAR_HEADING_PADDING_LEFT = '12px';
|
|
16
16
|
export var INLINE_SIDEBAR_HEIGHT = '54px';
|
|
17
|
-
export var SEARCH_ITEM_MARGIN = '12px';
|
|
18
17
|
export var SEARCH_ITEM_HEIGHT_WIDTH = '20px';
|
|
19
18
|
export var SCROLLBAR_WIDTH = 15;
|
|
20
19
|
export var ELEMENT_LIST_PADDING = 2;
|
package/dist/esm/ui/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { N30 } from '@atlaskit/theme/colors';
|
|
5
5
|
export { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
@@ -12,7 +12,4 @@ export var expandIconWrapperStyle = css(_templateObject5 || (_templateObject5 =
|
|
|
12
12
|
export var triggerWrapperStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
13
13
|
export var buttonContentStyle = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 80px;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n flex-direction: column;\n padding: 6px;\n"])));
|
|
14
14
|
export var buttonContentReducedSpacingStyle = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: 8px;\n"])));
|
|
15
|
-
|
|
16
|
-
// Taken from the style of inline dialog components
|
|
17
|
-
export var dropShadow = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n"])), "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"));
|
|
18
|
-
export var clickSelectWrapperStyle = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n user-select: all;\n"])));
|
|
15
|
+
export var clickSelectWrapperStyle = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n user-select: all;\n"])));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { createEditorSelectionAPI } from '../selection-api/api';
|
|
3
2
|
import createPluginsList from '../create-editor/create-plugins-list';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -17,9 +16,8 @@ var getEditorPlugins = function getEditorPlugins(_ref) {
|
|
|
17
16
|
insertNodeAPI = _ref.insertNodeAPI,
|
|
18
17
|
editorAnalyticsAPI = _ref.editorAnalyticsAPI;
|
|
19
18
|
var dangerouslyAppendedPlugins = (_props$dangerouslyApp = (_props$dangerouslyApp2 = props.dangerouslyAppendPlugins) === null || _props$dangerouslyApp2 === void 0 ? void 0 : _props$dangerouslyApp2.__plugins) !== null && _props$dangerouslyApp !== void 0 ? _props$dangerouslyApp : [];
|
|
20
|
-
var selectionAPI = createEditorSelectionAPI();
|
|
21
19
|
return [].concat(_toConsumableArray(createPluginsList(props, {
|
|
22
20
|
appearance: prevAppearance
|
|
23
|
-
}, createAnalyticsEvent
|
|
21
|
+
}, createAnalyticsEvent)), _toConsumableArray(dangerouslyAppendedPlugins));
|
|
24
22
|
};
|
|
25
23
|
export default getEditorPlugins;
|