@atlaskit/editor-common 72.1.2 → 72.2.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 +21 -0
- package/dist/cjs/__tests_external__/cases/fundamentals/collection.js +0 -5
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -4
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -8
- package/dist/cjs/__tests_external__/cases/smart-links/index.js +0 -4
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/delete.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/edit.js +2 -12
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -6
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/insert.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/delete.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/edit.js +2 -12
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -6
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/insert.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/delete.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/edit.js +2 -12
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -7
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/insert.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -4
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/insert.js +1 -8
- package/dist/cjs/__tests_external__/index.js +0 -3
- package/dist/cjs/__tests_external__/page-objects/Editor.js +0 -16
- package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +0 -29
- package/dist/cjs/__tests_external__/page-objects/Renderer.js +0 -14
- package/dist/cjs/analytics/index.js +0 -1
- package/dist/cjs/analytics/types/enums.js +1 -16
- package/dist/cjs/analytics/types/extension-events.js +0 -4
- package/dist/cjs/analytics/types/format-events.js +0 -3
- package/dist/cjs/analytics/types/general-events.js +0 -7
- package/dist/cjs/analytics/types/index.js +0 -14
- package/dist/cjs/analytics/types/inline-comment-events.js +0 -1
- package/dist/cjs/analytics/types/insert-events.js +0 -7
- package/dist/cjs/analytics/types/list-events.js +0 -3
- package/dist/cjs/analytics/types/node-events.js +0 -3
- package/dist/cjs/analytics/types/substitute-events.js +0 -3
- package/dist/cjs/analytics/types/table-events.js +0 -4
- package/dist/cjs/analytics/types/toolbar-button.js +0 -1
- package/dist/cjs/analytics/types/utils.js +0 -3
- package/dist/cjs/core-utils/index.js +0 -1
- package/dist/cjs/core-utils/inside.js +2 -5
- package/dist/cjs/emoji.js +0 -3
- package/dist/cjs/event-dispatcher/index.js +0 -14
- package/dist/cjs/extensions/combine-extension-providers.js +2 -6
- package/dist/cjs/extensions/default-extension-provider.js +0 -26
- package/dist/cjs/extensions/extension-fields-helpers.js +0 -35
- package/dist/cjs/extensions/extension-handlers.js +0 -27
- package/dist/cjs/extensions/index.js +0 -8
- package/dist/cjs/extensions/manifest-helpers.js +4 -30
- package/dist/cjs/extensions/module-helpers.js +17 -89
- package/dist/cjs/extensions/types/field-definitions.js +1 -10
- package/dist/cjs/extensions/types/index.js +0 -1
- package/dist/cjs/extensions.js +0 -1
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -27
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/languages.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/icons/index.js +0 -11
- package/dist/cjs/icons/shared/PanelErrorIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelInfoIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelNoteIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelSuccessIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelWarningIcon.js +0 -7
- package/dist/cjs/icons/shared/table.js +1 -3
- package/dist/cjs/in-product.js +0 -1
- package/dist/cjs/keymaps/index.js +2 -50
- package/dist/cjs/mention.js +0 -3
- package/dist/cjs/messages/codeBidiWarning.js +0 -2
- package/dist/cjs/messages/codeBlockCopyButton.js +0 -2
- package/dist/cjs/messages/index.js +0 -8
- package/dist/cjs/messages/insert-block.js +0 -2
- package/dist/cjs/messages/link.js +0 -2
- package/dist/cjs/messages/unsupportedContent.js +0 -2
- package/dist/cjs/node-width/index.js +2 -20
- package/dist/cjs/normalize-feature-flags.js +6 -25
- package/dist/cjs/panel.js +0 -1
- package/dist/cjs/provider-factory/context.js +3 -17
- package/dist/cjs/provider-factory/provider-factory.js +0 -19
- package/dist/cjs/provider-factory/with-providers.js +5 -28
- package/dist/cjs/provider-factory.js +0 -4
- package/dist/cjs/provider-helpers/combine-providers.js +3 -33
- package/dist/cjs/provider-helpers/index.js +0 -2
- package/dist/cjs/provider-helpers/promise-helpers.js +3 -15
- package/dist/cjs/react-node-view/index.js +18 -48
- package/dist/cjs/safe-plugin/index.js +1 -14
- package/dist/cjs/selection/gap-cursor/selection.js +8 -44
- package/dist/cjs/selection/gap-cursor/utils/index.js +0 -2
- package/dist/cjs/selection/gap-cursor/utils/is-ignored.js +0 -2
- package/dist/cjs/selection/gap-cursor/utils/is-valid-target-node.js +0 -3
- package/dist/cjs/selection/index.js +0 -4
- package/dist/cjs/selection/types.js +0 -1
- package/dist/cjs/selection/utils.js +0 -12
- package/dist/cjs/styles/index.js +0 -23
- package/dist/cjs/styles/shared/annotation.js +0 -11
- package/dist/cjs/styles/shared/block-marks.js +0 -5
- package/dist/cjs/styles/shared/blockquote.js +0 -7
- package/dist/cjs/styles/shared/code-block.js +0 -11
- package/dist/cjs/styles/shared/code-mark.js +0 -9
- package/dist/cjs/styles/shared/column-layout.js +0 -6
- package/dist/cjs/styles/shared/date.js +0 -5
- package/dist/cjs/styles/shared/emoji.js +0 -2
- package/dist/cjs/styles/shared/extension.js +0 -2
- package/dist/cjs/styles/shared/headings.js +0 -7
- package/dist/cjs/styles/shared/indentation.js +0 -5
- package/dist/cjs/styles/shared/layout.js +0 -2
- package/dist/cjs/styles/shared/link.js +0 -5
- package/dist/cjs/styles/shared/lists.js +2 -21
- package/dist/cjs/styles/shared/media-single.js +0 -5
- package/dist/cjs/styles/shared/panel.js +15 -41
- package/dist/cjs/styles/shared/paragraph.js +0 -6
- package/dist/cjs/styles/shared/rule.js +2 -10
- package/dist/cjs/styles/shared/shadow.js +1 -9
- package/dist/cjs/styles/shared/smart-card.js +0 -3
- package/dist/cjs/styles/shared/table.js +0 -20
- package/dist/cjs/styles/shared/task-decision.js +0 -6
- package/dist/cjs/styles/shared/text-color.js +0 -5
- package/dist/cjs/styles/shared/whitespace.js +0 -5
- package/dist/cjs/transforms/expand.js +7 -16
- package/dist/cjs/transforms/extension.js +2 -7
- package/dist/cjs/transforms/index.js +0 -3
- package/dist/cjs/transforms/layout.js +9 -15
- package/dist/cjs/type-ahead/index.js +0 -3
- package/dist/cjs/types/annotation/emitter.js +0 -11
- package/dist/cjs/types/annotation/index.js +0 -1
- package/dist/cjs/types/index.js +0 -4
- package/dist/cjs/types/toolbar.js +0 -5
- package/dist/cjs/ufo/experience-store.js +0 -24
- package/dist/cjs/ufo/index.js +0 -1
- package/dist/cjs/ui/BaseTheme/index.js +3 -21
- package/dist/cjs/ui/Caption/index.js +5 -29
- package/dist/cjs/ui/Caption/messages.js +0 -2
- package/dist/cjs/ui/DropList/index.js +18 -51
- package/dist/cjs/ui/Emoji/index.js +7 -33
- package/dist/cjs/ui/ErrorBoundary/index.js +0 -22
- package/dist/cjs/ui/Expand/index.js +5 -31
- package/dist/cjs/ui/IntlErrorBoundary/index.js +0 -24
- package/dist/cjs/ui/IntlProviderIfMissingWrapper/index.js +0 -9
- package/dist/cjs/ui/Layer/index.js +16 -46
- package/dist/cjs/ui/Layer/internal/helpers.js +0 -2
- package/dist/cjs/ui/MediaSingle/grid.js +0 -8
- package/dist/cjs/ui/MediaSingle/index.js +26 -44
- package/dist/cjs/ui/MediaSingle/link.js +0 -5
- package/dist/cjs/ui/MediaSingle/styled.js +11 -50
- package/dist/cjs/ui/Mention/index.js +5 -27
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +8 -16
- package/dist/cjs/ui/Mention/mention-with-providers.js +5 -33
- package/dist/cjs/ui/Messages/index.js +0 -18
- package/dist/cjs/ui/OverflowShadow/index.js +3 -48
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +2 -26
- package/dist/cjs/ui/Popup/index.js +28 -80
- package/dist/cjs/ui/Popup/utils.js +67 -132
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +3 -13
- package/dist/cjs/ui/PortalProvider/index.js +16 -73
- package/dist/cjs/ui/UnsupportedBlock/index.js +5 -29
- package/dist/cjs/ui/UnsupportedInline/index.js +5 -29
- package/dist/cjs/ui/WidthProvider/index.js +1 -31
- package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +2 -16
- package/dist/cjs/ui/clear-next-sibling-margin-top.js +0 -5
- package/dist/cjs/ui/index.js +0 -23
- package/dist/cjs/ui/unsupported-content-helper.js +0 -5
- package/dist/cjs/ui/with-outer-listeners.js +0 -25
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +12 -40
- package/dist/cjs/ui-color/ColorPalette/Color/styles.js +0 -10
- package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +0 -7
- package/dist/cjs/ui-color/ColorPalette/Palettes/common.js +4 -12
- package/dist/cjs/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/index.js +0 -1
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +0 -8
- package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +0 -10
- package/dist/cjs/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -7
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -9
- package/dist/cjs/ui-color/ColorPalette/index.js +16 -38
- package/dist/cjs/ui-color/ColorPalette/styles.js +0 -6
- package/dist/cjs/ui-color/index.js +0 -9
- package/dist/cjs/ui-menu/Dropdown/index.js +15 -39
- package/dist/cjs/ui-menu/DropdownMenu/index.js +43 -79
- package/dist/cjs/ui-menu/MenuArrowKeyNavigationProvider/index.js +66 -82
- package/dist/cjs/ui-menu/ToolbarButton/index.js +23 -46
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +0 -6
- package/dist/cjs/ui-menu/index.js +0 -7
- package/dist/cjs/ui-react/ReactEditorViewContext.js +0 -4
- package/dist/cjs/ui-react/index.js +0 -3
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +12 -52
- package/dist/cjs/utils/analytics.js +0 -14
- package/dist/cjs/utils/annotation/index.js +5 -13
- package/dist/cjs/utils/breakout.js +7 -23
- package/dist/cjs/utils/browser-extensions.js +28 -56
- package/dist/cjs/utils/browser.js +0 -2
- package/dist/cjs/utils/builder.js +0 -10
- package/dist/cjs/utils/collab.js +0 -4
- package/dist/cjs/utils/compare-props.js +11 -25
- package/dist/cjs/utils/compareNodes.js +7 -53
- package/dist/cjs/utils/compose.js +0 -2
- package/dist/cjs/utils/date.js +4 -25
- package/dist/cjs/utils/dom.js +6 -29
- package/dist/cjs/utils/editor-core-utils.js +8 -33
- package/dist/cjs/utils/error-reporter.js +0 -7
- package/dist/cjs/utils/extension-handler.js +0 -3
- package/dist/cjs/utils/get-performance-options.js +4 -12
- package/dist/cjs/utils/getModeFromTheme.js +0 -1
- package/dist/cjs/utils/imageLoader.js +0 -27
- package/dist/cjs/utils/index.js +0 -40
- package/dist/cjs/utils/is-text-input.js +5 -11
- package/dist/cjs/utils/list.js +3 -13
- package/dist/cjs/utils/macro.js +1 -7
- package/dist/cjs/utils/nodes.js +4 -31
- package/dist/cjs/utils/outdated-browsers.js +0 -10
- package/dist/cjs/utils/performance/hooks/use-component-render-tracking/index.js +4 -14
- package/dist/cjs/utils/performance/is-performance-api-available.js +0 -4
- package/dist/cjs/utils/performance/measure-render.js +1 -11
- package/dist/cjs/utils/performance/measure-tti.js +3 -17
- package/dist/cjs/utils/performance/measure.js +0 -11
- package/dist/cjs/utils/performance/navigation.js +0 -5
- package/dist/cjs/utils/plugin-state-factory.js +3 -11
- package/dist/cjs/utils/profiler/render-count.js +4 -24
- package/dist/cjs/utils/referentiality.js +30 -88
- package/dist/cjs/utils/sendLogs.js +0 -2
- package/dist/cjs/utils/should-force-tracking.js +4 -7
- package/dist/cjs/utils/slice.js +0 -17
- package/dist/cjs/utils/table.js +4 -13
- package/dist/cjs/utils/track-unsupported-content.js +14 -39
- package/dist/cjs/utils/traversor.js +0 -14
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +5 -21
- package/dist/cjs/utils/validate-using-spec.js +5 -36
- package/dist/cjs/utils/validator.js +26 -188
- package/dist/cjs/validator.js +0 -1
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/with-plugin-state/index.js +7 -55
- package/dist/es2019/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -3
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -2
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -2
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -2
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/Editor.js +0 -4
- package/dist/es2019/__tests_external__/page-objects/EditorSmartLink.js +0 -28
- package/dist/es2019/__tests_external__/page-objects/Renderer.js +0 -2
- package/dist/es2019/analytics/types/enums.js +1 -16
- package/dist/es2019/analytics/types/extension-events.js +2 -3
- package/dist/es2019/analytics/types/format-events.js +0 -3
- package/dist/es2019/analytics/types/general-events.js +0 -7
- package/dist/es2019/analytics/types/inline-comment-events.js +0 -1
- package/dist/es2019/analytics/types/insert-events.js +0 -7
- package/dist/es2019/analytics/types/list-events.js +0 -3
- package/dist/es2019/analytics/types/node-events.js +0 -3
- package/dist/es2019/analytics/types/substitute-events.js +0 -3
- package/dist/es2019/analytics/types/table-events.js +2 -3
- package/dist/es2019/analytics/types/toolbar-button.js +0 -1
- package/dist/es2019/analytics/types/utils.js +0 -3
- package/dist/es2019/event-dispatcher/index.js +1 -12
- package/dist/es2019/extensions/combine-extension-providers.js +0 -5
- package/dist/es2019/extensions/default-extension-provider.js +0 -8
- package/dist/es2019/extensions/extension-fields-helpers.js +4 -10
- package/dist/es2019/extensions/extension-handlers.js +1 -8
- package/dist/es2019/extensions/manifest-helpers.js +2 -7
- package/dist/es2019/extensions/module-helpers.js +10 -43
- package/dist/es2019/extensions/types/field-definitions.js +1 -0
- package/dist/es2019/icons/index.js +1 -3
- package/dist/es2019/icons/shared/PanelErrorIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelInfoIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelNoteIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelSuccessIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelWarningIcon.js +0 -2
- package/dist/es2019/keymaps/index.js +0 -24
- package/dist/es2019/node-width/index.js +3 -14
- package/dist/es2019/normalize-feature-flags.js +1 -11
- package/dist/es2019/provider-factory/context.js +0 -1
- package/dist/es2019/provider-factory/provider-factory.js +0 -25
- package/dist/es2019/provider-factory/with-providers.js +2 -8
- package/dist/es2019/provider-helpers/combine-providers.js +3 -13
- package/dist/es2019/provider-helpers/promise-helpers.js +3 -10
- package/dist/es2019/react-node-view/index.js +10 -34
- package/dist/es2019/safe-plugin/index.js +1 -1
- package/dist/es2019/selection/gap-cursor/selection.js +6 -31
- package/dist/es2019/selection/types.js +0 -1
- package/dist/es2019/selection/utils.js +0 -8
- package/dist/es2019/styles/shared/headings.js +3 -2
- package/dist/es2019/styles/shared/lists.js +0 -8
- package/dist/es2019/styles/shared/panel.js +13 -12
- package/dist/es2019/styles/shared/paragraph.js +2 -1
- package/dist/es2019/styles/shared/rule.js +2 -1
- package/dist/es2019/styles/shared/shadow.js +2 -0
- package/dist/es2019/styles/shared/table.js +1 -5
- package/dist/es2019/transforms/expand.js +3 -3
- package/dist/es2019/transforms/extension.js +3 -4
- package/dist/es2019/transforms/layout.js +9 -10
- package/dist/es2019/type-ahead/index.js +0 -3
- package/dist/es2019/types/annotation/emitter.js +0 -8
- package/dist/es2019/types/index.js +0 -2
- package/dist/es2019/types/toolbar.js +0 -5
- package/dist/es2019/ufo/experience-store.js +0 -25
- package/dist/es2019/ui/BaseTheme/index.js +0 -2
- package/dist/es2019/ui/Caption/index.js +0 -2
- package/dist/es2019/ui/DropList/index.js +9 -25
- package/dist/es2019/ui/Emoji/index.js +0 -11
- package/dist/es2019/ui/ErrorBoundary/index.js +0 -8
- package/dist/es2019/ui/Expand/index.js +2 -10
- package/dist/es2019/ui/IntlErrorBoundary/index.js +0 -8
- package/dist/es2019/ui/IntlProviderIfMissingWrapper/index.js +0 -4
- package/dist/es2019/ui/Layer/index.js +13 -29
- package/dist/es2019/ui/Layer/internal/helpers.js +0 -2
- package/dist/es2019/ui/MediaSingle/index.js +7 -12
- package/dist/es2019/ui/MediaSingle/styled.js +2 -25
- package/dist/es2019/ui/Mention/index.js +0 -5
- package/dist/es2019/ui/Mention/mention-with-providers.js +0 -8
- package/dist/es2019/ui/Messages/index.js +1 -2
- package/dist/es2019/ui/OverflowShadow/index.js +0 -32
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +0 -14
- package/dist/es2019/ui/Popup/index.js +11 -59
- package/dist/es2019/ui/Popup/utils.js +18 -57
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +2 -1
- package/dist/es2019/ui/PortalProvider/index.js +7 -35
- package/dist/es2019/ui/UnsupportedBlock/index.js +0 -2
- package/dist/es2019/ui/UnsupportedInline/index.js +0 -2
- package/dist/es2019/ui/WidthProvider/index.js +0 -9
- package/dist/es2019/ui/WithCreateAnalyticsEvent/index.js +0 -1
- package/dist/es2019/ui/clear-next-sibling-margin-top.js +2 -1
- package/dist/es2019/ui/unsupported-content-helper.js +0 -4
- package/dist/es2019/ui/with-outer-listeners.js +0 -8
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +0 -10
- package/dist/es2019/ui-color/ColorPalette/Color/styles.js +1 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/common.js +2 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +5 -3
- package/dist/es2019/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +4 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -3
- package/dist/es2019/ui-color/ColorPalette/index.js +3 -10
- package/dist/es2019/ui-menu/Dropdown/index.js +1 -8
- package/dist/es2019/ui-menu/DropdownMenu/index.js +23 -27
- package/dist/es2019/ui-menu/MenuArrowKeyNavigationProvider/index.js +59 -73
- package/dist/es2019/ui-menu/ToolbarButton/index.js +2 -6
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +7 -25
- package/dist/es2019/utils/analytics.js +0 -8
- package/dist/es2019/utils/annotation/index.js +3 -7
- package/dist/es2019/utils/breakout.js +6 -13
- package/dist/es2019/utils/browser-extensions.js +10 -22
- package/dist/es2019/utils/browser.js +0 -2
- package/dist/es2019/utils/builder.js +0 -2
- package/dist/es2019/utils/collab.js +0 -2
- package/dist/es2019/utils/compare-props.js +5 -4
- package/dist/es2019/utils/compareNodes.js +3 -42
- package/dist/es2019/utils/date.js +4 -11
- package/dist/es2019/utils/dom.js +6 -19
- package/dist/es2019/utils/editor-core-utils.js +6 -11
- package/dist/es2019/utils/error-reporter.js +0 -4
- package/dist/es2019/utils/get-performance-options.js +3 -3
- package/dist/es2019/utils/imageLoader.js +0 -11
- package/dist/es2019/utils/is-text-input.js +1 -2
- package/dist/es2019/utils/list.js +3 -7
- package/dist/es2019/utils/macro.js +0 -3
- package/dist/es2019/utils/nodes.js +3 -11
- package/dist/es2019/utils/outdated-browsers.js +0 -8
- package/dist/es2019/utils/performance/hooks/use-component-render-tracking/index.js +0 -4
- package/dist/es2019/utils/performance/is-performance-api-available.js +0 -1
- package/dist/es2019/utils/performance/measure-render.js +2 -10
- package/dist/es2019/utils/performance/measure-tti.js +3 -11
- package/dist/es2019/utils/performance/measure.js +0 -6
- package/dist/es2019/utils/performance/navigation.js +0 -3
- package/dist/es2019/utils/plugin-state-factory.js +1 -10
- package/dist/es2019/utils/profiler/render-count.js +10 -23
- package/dist/es2019/utils/referentiality.js +24 -65
- package/dist/es2019/utils/should-force-tracking.js +2 -1
- package/dist/es2019/utils/slice.js +1 -9
- package/dist/es2019/utils/table.js +2 -6
- package/dist/es2019/utils/track-unsupported-content.js +6 -11
- package/dist/es2019/utils/traversor.js +0 -13
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -15
- package/dist/es2019/utils/validate-using-spec.js +3 -25
- package/dist/es2019/utils/validator.js +10 -149
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/with-plugin-state/index.js +5 -46
- package/dist/esm/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -3
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/delete.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/edit.js +2 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/insert.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/delete.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/edit.js +2 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/insert.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/delete.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/edit.js +2 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/insert.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/url/insert.js +1 -2
- package/dist/esm/__tests_external__/page-objects/Editor.js +0 -9
- package/dist/esm/__tests_external__/page-objects/EditorSmartLink.js +0 -23
- package/dist/esm/__tests_external__/page-objects/Renderer.js +0 -8
- package/dist/esm/analytics/types/enums.js +1 -16
- package/dist/esm/analytics/types/extension-events.js +2 -3
- package/dist/esm/analytics/types/format-events.js +0 -3
- package/dist/esm/analytics/types/general-events.js +0 -7
- package/dist/esm/analytics/types/inline-comment-events.js +0 -1
- package/dist/esm/analytics/types/insert-events.js +0 -7
- package/dist/esm/analytics/types/list-events.js +0 -3
- package/dist/esm/analytics/types/node-events.js +0 -3
- package/dist/esm/analytics/types/substitute-events.js +0 -3
- package/dist/esm/analytics/types/table-events.js +2 -3
- package/dist/esm/analytics/types/toolbar-button.js +0 -1
- package/dist/esm/analytics/types/utils.js +0 -3
- package/dist/esm/core-utils/inside.js +2 -2
- package/dist/esm/event-dispatcher/index.js +1 -9
- package/dist/esm/extensions/combine-extension-providers.js +2 -4
- package/dist/esm/extensions/default-extension-provider.js +0 -22
- package/dist/esm/extensions/extension-fields-helpers.js +3 -29
- package/dist/esm/extensions/extension-handlers.js +1 -18
- package/dist/esm/extensions/manifest-helpers.js +4 -17
- package/dist/esm/extensions/module-helpers.js +17 -74
- package/dist/esm/extensions/types/field-definitions.js +1 -0
- package/dist/esm/icons/index.js +1 -3
- package/dist/esm/icons/shared/PanelErrorIcon.js +0 -2
- package/dist/esm/icons/shared/PanelInfoIcon.js +0 -2
- package/dist/esm/icons/shared/PanelNoteIcon.js +0 -2
- package/dist/esm/icons/shared/PanelSuccessIcon.js +0 -2
- package/dist/esm/icons/shared/PanelWarningIcon.js +0 -2
- package/dist/esm/keymaps/index.js +2 -28
- package/dist/esm/node-width/index.js +3 -14
- package/dist/esm/normalize-feature-flags.js +6 -19
- package/dist/esm/provider-factory/context.js +3 -5
- package/dist/esm/provider-factory/provider-factory.js +0 -18
- package/dist/esm/provider-factory/with-providers.js +5 -23
- package/dist/esm/provider-helpers/combine-providers.js +3 -27
- package/dist/esm/provider-helpers/promise-helpers.js +3 -10
- package/dist/esm/react-node-view/index.js +18 -42
- package/dist/esm/safe-plugin/index.js +1 -7
- package/dist/esm/selection/gap-cursor/selection.js +8 -35
- package/dist/esm/selection/types.js +0 -1
- package/dist/esm/selection/utils.js +0 -8
- package/dist/esm/styles/shared/annotation.js +0 -2
- package/dist/esm/styles/shared/block-marks.js +0 -2
- package/dist/esm/styles/shared/blockquote.js +0 -2
- package/dist/esm/styles/shared/code-block.js +0 -2
- package/dist/esm/styles/shared/code-mark.js +0 -2
- package/dist/esm/styles/shared/column-layout.js +0 -2
- package/dist/esm/styles/shared/date.js +0 -2
- package/dist/esm/styles/shared/headings.js +3 -4
- package/dist/esm/styles/shared/indentation.js +0 -2
- package/dist/esm/styles/shared/link.js +0 -2
- package/dist/esm/styles/shared/lists.js +2 -13
- package/dist/esm/styles/shared/media-single.js +0 -2
- package/dist/esm/styles/shared/panel.js +15 -17
- package/dist/esm/styles/shared/paragraph.js +2 -3
- package/dist/esm/styles/shared/rule.js +2 -3
- package/dist/esm/styles/shared/shadow.js +2 -2
- package/dist/esm/styles/shared/table.js +1 -8
- package/dist/esm/styles/shared/task-decision.js +0 -2
- package/dist/esm/styles/shared/text-color.js +0 -2
- package/dist/esm/styles/shared/whitespace.js +0 -2
- package/dist/esm/transforms/expand.js +7 -7
- package/dist/esm/transforms/extension.js +3 -4
- package/dist/esm/transforms/layout.js +9 -10
- package/dist/esm/type-ahead/index.js +0 -3
- package/dist/esm/types/annotation/emitter.js +0 -6
- package/dist/esm/types/index.js +0 -2
- package/dist/esm/types/toolbar.js +0 -5
- package/dist/esm/ufo/experience-store.js +0 -19
- package/dist/esm/ui/BaseTheme/index.js +3 -7
- package/dist/esm/ui/Caption/index.js +5 -14
- package/dist/esm/ui/DropList/index.js +18 -47
- package/dist/esm/ui/Emoji/index.js +7 -26
- package/dist/esm/ui/ErrorBoundary/index.js +0 -14
- package/dist/esm/ui/Expand/index.js +5 -15
- package/dist/esm/ui/IntlErrorBoundary/index.js +0 -16
- package/dist/esm/ui/IntlProviderIfMissingWrapper/index.js +0 -4
- package/dist/esm/ui/Layer/index.js +16 -39
- package/dist/esm/ui/Layer/internal/helpers.js +0 -2
- package/dist/esm/ui/MediaSingle/index.js +25 -32
- package/dist/esm/ui/MediaSingle/link.js +0 -2
- package/dist/esm/ui/MediaSingle/styled.js +11 -39
- package/dist/esm/ui/Mention/index.js +5 -18
- package/dist/esm/ui/Mention/mention-with-profilecard.js +8 -8
- package/dist/esm/ui/Mention/mention-with-providers.js +5 -21
- package/dist/esm/ui/Messages/index.js +1 -4
- package/dist/esm/ui/OverflowShadow/index.js +3 -46
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +2 -27
- package/dist/esm/ui/Popup/index.js +28 -80
- package/dist/esm/ui/Popup/utils.js +67 -123
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +3 -3
- package/dist/esm/ui/PortalProvider/index.js +17 -61
- package/dist/esm/ui/UnsupportedBlock/index.js +5 -11
- package/dist/esm/ui/UnsupportedInline/index.js +5 -11
- package/dist/esm/ui/WidthProvider/index.js +1 -17
- package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +2 -10
- package/dist/esm/ui/clear-next-sibling-margin-top.js +2 -3
- package/dist/esm/ui/unsupported-content-helper.js +0 -4
- package/dist/esm/ui/with-outer-listeners.js +0 -15
- package/dist/esm/ui-color/ColorPalette/Color/index.js +12 -27
- package/dist/esm/ui-color/ColorPalette/Color/styles.js +1 -6
- package/dist/esm/ui-color/ColorPalette/Palettes/common.js +5 -7
- package/dist/esm/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +2 -4
- package/dist/esm/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +0 -5
- package/dist/esm/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -3
- package/dist/esm/ui-color/ColorPalette/index.js +16 -24
- package/dist/esm/ui-color/ColorPalette/styles.js +0 -2
- package/dist/esm/ui-menu/Dropdown/index.js +15 -28
- package/dist/esm/ui-menu/DropdownMenu/index.js +43 -60
- package/dist/esm/ui-menu/MenuArrowKeyNavigationProvider/index.js +66 -78
- package/dist/esm/ui-menu/ToolbarButton/index.js +23 -32
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +12 -41
- package/dist/esm/utils/analytics.js +0 -8
- package/dist/esm/utils/annotation/index.js +5 -9
- package/dist/esm/utils/breakout.js +8 -15
- package/dist/esm/utils/browser-extensions.js +28 -55
- package/dist/esm/utils/browser.js +0 -2
- package/dist/esm/utils/builder.js +0 -4
- package/dist/esm/utils/collab.js +0 -2
- package/dist/esm/utils/compare-props.js +10 -15
- package/dist/esm/utils/compareNodes.js +7 -48
- package/dist/esm/utils/compose.js +0 -1
- package/dist/esm/utils/date.js +4 -11
- package/dist/esm/utils/dom.js +6 -19
- package/dist/esm/utils/editor-core-utils.js +8 -13
- package/dist/esm/utils/error-reporter.js +0 -5
- package/dist/esm/utils/get-performance-options.js +7 -7
- package/dist/esm/utils/imageLoader.js +0 -18
- package/dist/esm/utils/is-text-input.js +5 -6
- package/dist/esm/utils/list.js +3 -7
- package/dist/esm/utils/macro.js +1 -5
- package/dist/esm/utils/nodes.js +5 -13
- package/dist/esm/utils/outdated-browsers.js +0 -8
- package/dist/esm/utils/performance/hooks/use-component-render-tracking/index.js +4 -10
- package/dist/esm/utils/performance/is-performance-api-available.js +0 -1
- package/dist/esm/utils/performance/measure-render.js +2 -9
- package/dist/esm/utils/performance/measure-tti.js +3 -12
- package/dist/esm/utils/performance/measure.js +0 -6
- package/dist/esm/utils/performance/navigation.js +0 -3
- package/dist/esm/utils/plugin-state-factory.js +3 -10
- package/dist/esm/utils/profiler/render-count.js +4 -21
- package/dist/esm/utils/referentiality.js +30 -80
- package/dist/esm/utils/should-force-tracking.js +4 -4
- package/dist/esm/utils/slice.js +1 -10
- package/dist/esm/utils/table.js +4 -8
- package/dist/esm/utils/track-unsupported-content.js +14 -31
- package/dist/esm/utils/traversor.js +0 -13
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +5 -18
- package/dist/esm/utils/validate-using-spec.js +5 -29
- package/dist/esm/utils/validator.js +26 -170
- package/dist/esm/version.json +1 -1
- package/dist/esm/with-plugin-state/index.js +7 -55
- package/dist/types/analytics/types/enums.d.ts +1 -1
- package/dist/types/analytics/types/events.d.ts +3 -2
- package/dist/types/analytics/types/general-events.d.ts +8 -3
- package/dist/types/types/editor-plugin.d.ts +24 -2
- package/dist/types/types/floating-toolbar.d.ts +10 -0
- package/dist/types/types/type-ahead.d.ts +8 -0
- package/dist/types/ui-menu/DropdownMenu/index.d.ts +1 -1
- package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -0
- package/dist/types/ui-menu/MenuArrowKeyNavigationProvider/index.d.ts +3 -2
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
|
|
4
3
|
/** @jsx jsx */
|
|
5
4
|
import React, { PureComponent } from 'react';
|
|
6
5
|
import { css, jsx } from '@emotion/react';
|
|
@@ -23,7 +22,6 @@ const focusedMenuItemStyle = css`
|
|
|
23
22
|
box-shadow: inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`};
|
|
24
23
|
outline: none;
|
|
25
24
|
`;
|
|
26
|
-
|
|
27
25
|
const buttonStyles = isActive => theme => {
|
|
28
26
|
if (isActive) {
|
|
29
27
|
/**
|
|
@@ -80,46 +78,40 @@ const buttonStyles = isActive => theme => {
|
|
|
80
78
|
};
|
|
81
79
|
|
|
82
80
|
const DropListWithOutsideListeners = withReactEditorViewOuterListeners(DropList);
|
|
81
|
+
|
|
83
82
|
/**
|
|
84
83
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
85
84
|
* dropdown-menu outside of "overflow: hidden" containers when needed.
|
|
86
85
|
*
|
|
87
86
|
* Also it controls popper's placement.
|
|
88
87
|
*/
|
|
89
|
-
|
|
90
88
|
export default class DropdownMenuWrapper extends PureComponent {
|
|
91
89
|
constructor(...args) {
|
|
92
90
|
super(...args);
|
|
93
|
-
|
|
94
91
|
_defineProperty(this, "state", {
|
|
95
|
-
popupPlacement: ['bottom', 'left']
|
|
92
|
+
popupPlacement: ['bottom', 'left'],
|
|
93
|
+
selectionIndex: -1
|
|
96
94
|
});
|
|
97
|
-
|
|
98
95
|
_defineProperty(this, "handleRef", target => {
|
|
99
96
|
this.setState({
|
|
100
97
|
target: target || undefined
|
|
101
98
|
});
|
|
102
99
|
});
|
|
103
|
-
|
|
104
100
|
_defineProperty(this, "updatePopupPlacement", placement => {
|
|
105
101
|
const {
|
|
106
102
|
popupPlacement: previousPlacement
|
|
107
103
|
} = this.state;
|
|
108
|
-
|
|
109
104
|
if (placement[0] !== previousPlacement[0] || placement[1] !== previousPlacement[1]) {
|
|
110
105
|
this.setState({
|
|
111
106
|
popupPlacement: placement
|
|
112
107
|
});
|
|
113
108
|
}
|
|
114
109
|
});
|
|
115
|
-
|
|
116
|
-
_defineProperty(this, "handleCloseandFocus", () => {
|
|
110
|
+
_defineProperty(this, "handleCloseAndFocus", () => {
|
|
117
111
|
var _this$state$target, _this$state$target$qu;
|
|
118
|
-
|
|
119
112
|
this.handleClose();
|
|
120
113
|
(_this$state$target = this.state.target) === null || _this$state$target === void 0 ? void 0 : (_this$state$target$qu = _this$state$target.querySelector('button')) === null || _this$state$target$qu === void 0 ? void 0 : _this$state$target$qu.focus();
|
|
121
114
|
});
|
|
122
|
-
|
|
123
115
|
_defineProperty(this, "handleClose", () => {
|
|
124
116
|
if (this.props.onOpenChange) {
|
|
125
117
|
this.props.onOpenChange({
|
|
@@ -128,7 +120,6 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
128
120
|
}
|
|
129
121
|
});
|
|
130
122
|
}
|
|
131
|
-
|
|
132
123
|
renderDropdownMenu() {
|
|
133
124
|
const {
|
|
134
125
|
target,
|
|
@@ -146,7 +137,8 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
146
137
|
zIndex,
|
|
147
138
|
shouldUseDefaultRole,
|
|
148
139
|
disableArrowKeyNavigation,
|
|
149
|
-
keyDownHandlerContext
|
|
140
|
+
keyDownHandlerContext,
|
|
141
|
+
onItemActivated
|
|
150
142
|
} = this.props;
|
|
151
143
|
return jsx(Popup, {
|
|
152
144
|
target: isOpen ? target : undefined,
|
|
@@ -160,9 +152,21 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
160
152
|
offset: offset
|
|
161
153
|
}, jsx(MenuArrowKeyNavigationProvider, {
|
|
162
154
|
disableArrowKeyNavigation: disableArrowKeyNavigation,
|
|
163
|
-
handleClose: this.
|
|
155
|
+
handleClose: this.handleCloseAndFocus,
|
|
164
156
|
keyDownHandlerContext: keyDownHandlerContext,
|
|
165
|
-
|
|
157
|
+
onSelection: index => {
|
|
158
|
+
let result = [];
|
|
159
|
+
if (typeof onItemActivated === 'function') {
|
|
160
|
+
result = items.reduce((result, group) => {
|
|
161
|
+
return result.concat(group.items);
|
|
162
|
+
}, result);
|
|
163
|
+
onItemActivated({
|
|
164
|
+
item: result[index],
|
|
165
|
+
shouldCloseMenu: false
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
closeOnTab: true
|
|
166
170
|
}, jsx(DropListWithOutsideListeners, {
|
|
167
171
|
isOpen: true,
|
|
168
172
|
appearance: "tall",
|
|
@@ -171,7 +175,7 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
171
175
|
shouldFitContainer: true,
|
|
172
176
|
isTriggerNotTabbable: true,
|
|
173
177
|
handleClickOutside: this.handleClose,
|
|
174
|
-
handleEscapeKeydown: this.
|
|
178
|
+
handleEscapeKeydown: this.handleCloseAndFocus,
|
|
175
179
|
targetRef: this.state.target
|
|
176
180
|
}, jsx("div", {
|
|
177
181
|
style: {
|
|
@@ -183,7 +187,6 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
183
187
|
role: shouldUseDefaultRole ? 'group' : 'menu'
|
|
184
188
|
}, group.items.map(item => {
|
|
185
189
|
var _item$key;
|
|
186
|
-
|
|
187
190
|
return jsx(DropdownMenuItem, {
|
|
188
191
|
key: (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : String(item.content),
|
|
189
192
|
item: item,
|
|
@@ -194,7 +197,6 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
194
197
|
});
|
|
195
198
|
}))))));
|
|
196
199
|
}
|
|
197
|
-
|
|
198
200
|
render() {
|
|
199
201
|
const {
|
|
200
202
|
children,
|
|
@@ -206,7 +208,6 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
206
208
|
ref: this.handleRef
|
|
207
209
|
}, children), isOpen ? this.renderDropdownMenu() : null);
|
|
208
210
|
}
|
|
209
|
-
|
|
210
211
|
}
|
|
211
212
|
const DropdownMenuItemCustomComponent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
212
213
|
const {
|
|
@@ -217,7 +218,6 @@ const DropdownMenuItemCustomComponent = /*#__PURE__*/React.forwardRef((props, re
|
|
|
217
218
|
ref: ref
|
|
218
219
|
}, rest), children);
|
|
219
220
|
});
|
|
220
|
-
|
|
221
221
|
function DropdownMenuItem({
|
|
222
222
|
item,
|
|
223
223
|
onItemActivated,
|
|
@@ -226,7 +226,6 @@ function DropdownMenuItem({
|
|
|
226
226
|
onMouseLeave
|
|
227
227
|
}) {
|
|
228
228
|
var _item$key2;
|
|
229
|
-
|
|
230
229
|
// onClick and value.name are the action indicators in the handlers
|
|
231
230
|
// If neither are present, don't wrap in an Item.
|
|
232
231
|
if (!item.onClick && !(item.value && item.value.name)) {
|
|
@@ -234,12 +233,12 @@ function DropdownMenuItem({
|
|
|
234
233
|
key: String(item.content)
|
|
235
234
|
}, item.content);
|
|
236
235
|
}
|
|
237
|
-
|
|
238
236
|
const dropListItem = jsx("div", {
|
|
239
237
|
css: theme => buttonStyles(item.isActive)({
|
|
240
238
|
theme
|
|
241
239
|
}),
|
|
242
|
-
tabIndex: -1
|
|
240
|
+
tabIndex: -1,
|
|
241
|
+
"aria-disabled": item.isDisabled ? 'true' : 'false'
|
|
243
242
|
}, jsx(CustomItem, {
|
|
244
243
|
item: item,
|
|
245
244
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
@@ -265,16 +264,13 @@ function DropdownMenuItem({
|
|
|
265
264
|
item
|
|
266
265
|
})
|
|
267
266
|
}, item.content));
|
|
268
|
-
|
|
269
267
|
if (item.tooltipDescription) {
|
|
270
268
|
var _item$key3;
|
|
271
|
-
|
|
272
269
|
return jsx(Tooltip, {
|
|
273
270
|
key: (_item$key3 = item.key) !== null && _item$key3 !== void 0 ? _item$key3 : String(item.content),
|
|
274
271
|
content: item.tooltipDescription,
|
|
275
272
|
position: item.tooltipPosition
|
|
276
273
|
}, dropListItem);
|
|
277
274
|
}
|
|
278
|
-
|
|
279
275
|
return dropListItem;
|
|
280
276
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React, { useLayoutEffect, useRef } from 'react';
|
|
2
|
-
|
|
1
|
+
import React, { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* This component is a wrapper of vertical menus which listens to keydown events of children
|
|
5
4
|
* and handles up/down arrow key navigation
|
|
@@ -9,138 +8,125 @@ export const MenuArrowKeyNavigationProvider = ({
|
|
|
9
8
|
handleClose,
|
|
10
9
|
disableArrowKeyNavigation,
|
|
11
10
|
keyDownHandlerContext,
|
|
12
|
-
|
|
11
|
+
closeOnTab,
|
|
12
|
+
onSelection
|
|
13
13
|
}) => {
|
|
14
14
|
const wrapperRef = useRef(null);
|
|
15
|
-
const currentSelectedItemIndex =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const [currentSelectedItemIndex, setCurrentSelectedItemIndex] = useState(-1);
|
|
16
|
+
const incrementIndex = useCallback(list => {
|
|
17
|
+
const currentIndex = currentSelectedItemIndex;
|
|
18
|
+
let nextIndex = (currentIndex + 1) % list.length;
|
|
19
|
+
// Skips disabled items. Previously this function relied on a list of enabled elements which caused a
|
|
20
|
+
// difference between currentIndex and the item index in the menu.
|
|
21
|
+
while (nextIndex !== currentIndex && list[nextIndex].getAttribute('aria-disabled') === 'true') {
|
|
22
|
+
nextIndex = (nextIndex + 1) % list.length;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
setCurrentSelectedItemIndex(nextIndex);
|
|
25
|
+
return nextIndex;
|
|
26
|
+
}, [currentSelectedItemIndex]);
|
|
27
|
+
const decrementIndex = useCallback(list => {
|
|
28
|
+
const currentIndex = currentSelectedItemIndex;
|
|
29
|
+
let nextIndex = (list.length + currentIndex - 1) % list.length;
|
|
30
|
+
while (nextIndex !== currentIndex && list[nextIndex].getAttribute('aria-disabled') === 'true') {
|
|
31
|
+
nextIndex = (list.length + nextIndex - 1) % list.length;
|
|
30
32
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
setCurrentSelectedItemIndex(nextIndex);
|
|
34
|
+
return nextIndex;
|
|
35
|
+
}, [currentSelectedItemIndex]);
|
|
33
36
|
useLayoutEffect(() => {
|
|
34
37
|
if (disableArrowKeyNavigation) {
|
|
35
38
|
return;
|
|
36
39
|
}
|
|
40
|
+
|
|
37
41
|
/**
|
|
38
42
|
* To handle the key events on the list
|
|
39
43
|
* @param event
|
|
40
44
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
43
45
|
const handleKeyDown = event => {
|
|
44
|
-
var _wrapperRef$current
|
|
46
|
+
var _wrapperRef$current;
|
|
47
|
+
const targetElement = event.target;
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (event.key === 'Tab' && closeonTab) {
|
|
49
|
+
//Tab key on menu items can be handled in the parent components of dropdown menus with KeydownHandlerContext
|
|
50
|
+
if (event.key === 'Tab' && closeOnTab) {
|
|
49
51
|
handleClose(event);
|
|
50
52
|
keyDownHandlerContext === null || keyDownHandlerContext === void 0 ? void 0 : keyDownHandlerContext.handleTab();
|
|
51
53
|
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const focusableElements = getEnabledElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
54
|
+
}
|
|
56
55
|
|
|
56
|
+
//To trap the focus inside the toolbar using left and right arrow keys
|
|
57
|
+
const focusableElements = getFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
57
58
|
if (!focusableElements || (focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0) {
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
|
-
|
|
61
61
|
if (!((_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(targetElement))) {
|
|
62
|
-
|
|
62
|
+
setCurrentSelectedItemIndex(-1);
|
|
63
63
|
}
|
|
64
|
-
|
|
65
64
|
switch (event.key) {
|
|
66
65
|
case 'ArrowDown':
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
event.preventDefault();
|
|
75
|
-
break;
|
|
76
|
-
|
|
66
|
+
{
|
|
67
|
+
var _focusableElements$fo;
|
|
68
|
+
const focusIndex = incrementIndex(focusableElements);
|
|
69
|
+
(_focusableElements$fo = focusableElements[focusIndex]) === null || _focusableElements$fo === void 0 ? void 0 : _focusableElements$fo.focus();
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
77
73
|
case 'ArrowUp':
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
break;
|
|
74
|
+
{
|
|
75
|
+
var _focusableElements$fo2;
|
|
76
|
+
const focusIndex = decrementIndex(focusableElements);
|
|
77
|
+
(_focusableElements$fo2 = focusableElements[focusIndex]) === null || _focusableElements$fo2 === void 0 ? void 0 : _focusableElements$fo2.focus();
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
|
|
87
82
|
//ArrowLeft/Right on the menu should close the menus
|
|
88
83
|
//then logic to retain the focus can be handled in the parent components with KeydownHandlerContext
|
|
89
|
-
|
|
90
84
|
case 'ArrowLeft':
|
|
91
85
|
//Filter out the events from outside the menu
|
|
92
86
|
if (!targetElement.closest('.custom-key-handler-wrapper')) {
|
|
93
87
|
return;
|
|
94
88
|
}
|
|
95
|
-
|
|
89
|
+
if (!targetElement.closest('[data-testid="editor-floating-toolbar"]')) {
|
|
90
|
+
keyDownHandlerContext === null || keyDownHandlerContext === void 0 ? void 0 : keyDownHandlerContext.handleArrowLeft();
|
|
91
|
+
}
|
|
96
92
|
handleClose(event);
|
|
97
|
-
keyDownHandlerContext === null || keyDownHandlerContext === void 0 ? void 0 : keyDownHandlerContext.handleArrowLeft();
|
|
98
93
|
break;
|
|
99
|
-
|
|
100
94
|
case 'ArrowRight':
|
|
101
95
|
//Filter out the events from outside the menu
|
|
102
96
|
if (!targetElement.closest('.custom-key-handler-wrapper')) {
|
|
103
97
|
return;
|
|
104
98
|
}
|
|
105
|
-
|
|
99
|
+
if (!targetElement.closest('[data-testid="editor-floating-toolbar"]')) {
|
|
100
|
+
keyDownHandlerContext === null || keyDownHandlerContext === void 0 ? void 0 : keyDownHandlerContext.handleArrowRight();
|
|
101
|
+
}
|
|
106
102
|
handleClose(event);
|
|
107
|
-
keyDownHandlerContext === null || keyDownHandlerContext === void 0 ? void 0 : keyDownHandlerContext.handleArrowRight();
|
|
108
103
|
break;
|
|
109
|
-
|
|
110
104
|
case 'Escape':
|
|
111
105
|
handleClose(event);
|
|
112
106
|
break;
|
|
113
|
-
|
|
107
|
+
case 'Enter':
|
|
108
|
+
if (typeof onSelection === 'function') {
|
|
109
|
+
onSelection(currentSelectedItemIndex);
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
114
112
|
default:
|
|
115
113
|
return;
|
|
116
114
|
}
|
|
117
115
|
};
|
|
118
|
-
|
|
119
116
|
document.addEventListener('keydown', handleKeyDown);
|
|
120
117
|
return () => {
|
|
121
118
|
document.removeEventListener('keydown', handleKeyDown);
|
|
122
119
|
};
|
|
123
|
-
}, [currentSelectedItemIndex, wrapperRef, handleClose, disableArrowKeyNavigation, keyDownHandlerContext,
|
|
120
|
+
}, [currentSelectedItemIndex, wrapperRef, handleClose, disableArrowKeyNavigation, keyDownHandlerContext, closeOnTab, onSelection, incrementIndex, decrementIndex]);
|
|
124
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: "custom-key-handler-wrapper",
|
|
122
|
+
className: "menu-key-handler-wrapper custom-key-handler-wrapper",
|
|
126
123
|
ref: wrapperRef
|
|
127
124
|
}, children);
|
|
128
125
|
};
|
|
129
|
-
|
|
130
126
|
function getFocusableElements(rootNode) {
|
|
131
127
|
if (!rootNode) {
|
|
132
128
|
return [];
|
|
133
129
|
}
|
|
134
|
-
|
|
135
130
|
const focusableModalElements = rootNode.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, div[tabindex="-1"]') || [];
|
|
136
131
|
return Array.from(focusableModalElements);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* This method filters out all the disabled menu items
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
function getEnabledElements(rootNode) {
|
|
144
|
-
const focusableElements = getFocusableElements(rootNode);
|
|
145
|
-
return focusableElements.filter(element => !element.querySelector('[role="button"][aria-disabled="true"]') && !element.querySelector('[role="menuitem"][aria-disabled="true"]'));
|
|
146
132
|
}
|
|
@@ -39,20 +39,18 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
39
39
|
if (disabled) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
42
|
if (buttonId) {
|
|
44
|
-
analyticsEvent.update(payload => ({
|
|
43
|
+
analyticsEvent.update(payload => ({
|
|
44
|
+
...payload,
|
|
45
45
|
action: ACTION.CLICKED,
|
|
46
46
|
actionSubject: ACTION_SUBJECT.TOOLBAR_BUTTON,
|
|
47
47
|
actionSubjectId: buttonId,
|
|
48
48
|
eventType: EVENT_TYPE.UI
|
|
49
49
|
})).fire(FabricChannel.editor);
|
|
50
50
|
}
|
|
51
|
-
|
|
52
51
|
if (onClick) {
|
|
53
52
|
onClick(event);
|
|
54
53
|
}
|
|
55
|
-
|
|
56
54
|
if (item && onItemClick) {
|
|
57
55
|
onItemClick(item);
|
|
58
56
|
}
|
|
@@ -79,11 +77,9 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
79
77
|
"aria-pressed": ariaPressed,
|
|
80
78
|
"aria-keyshortcuts": ariaKeyShortcuts
|
|
81
79
|
}, children);
|
|
82
|
-
|
|
83
80
|
if (!title) {
|
|
84
81
|
return button;
|
|
85
82
|
}
|
|
86
|
-
|
|
87
83
|
const tooltipContent = !hideTooltip ? title : null;
|
|
88
84
|
return jsx(Tooltip, {
|
|
89
85
|
content: tooltipContent,
|
|
@@ -2,94 +2,76 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
4
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
5
|
-
|
|
6
5
|
class WithOutsideClick extends PureComponent {
|
|
7
6
|
constructor(...args) {
|
|
8
7
|
super(...args);
|
|
9
|
-
|
|
10
8
|
_defineProperty(this, "handleClick", evt => {
|
|
11
9
|
if (!this.props.isActiveComponent) {
|
|
12
10
|
return;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
const domNode = ReactDOM.findDOMNode(this); // eslint-disable-line react/no-find-dom-node
|
|
16
|
-
|
|
17
13
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
18
14
|
if (this.props.handleClickOutside) {
|
|
19
15
|
var _this$props$editorVie;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
this.props.handleClickOutside(evt);
|
|
17
|
+
//When the menus are closed by clicking outside the focus is set on editor.
|
|
23
18
|
if (!((_this$props$editorVie = this.props.editorView) !== null && _this$props$editorVie !== void 0 && _this$props$editorVie.hasFocus())) {
|
|
24
19
|
var _this$props$editorVie2;
|
|
25
|
-
|
|
26
20
|
(_this$props$editorVie2 = this.props.editorView) === null || _this$props$editorVie2 === void 0 ? void 0 : _this$props$editorVie2.focus();
|
|
27
21
|
}
|
|
28
22
|
}
|
|
29
23
|
}
|
|
30
24
|
});
|
|
31
|
-
|
|
32
25
|
_defineProperty(this, "handleKeydown", evt => {
|
|
33
26
|
if (!this.props.isActiveComponent) {
|
|
34
27
|
return;
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
if (evt.code === 'Escape' && this.props.handleEscapeKeydown) {
|
|
38
30
|
evt.preventDefault();
|
|
39
31
|
evt.stopPropagation();
|
|
40
|
-
this.props.handleEscapeKeydown(evt);
|
|
41
|
-
|
|
32
|
+
this.props.handleEscapeKeydown(evt);
|
|
33
|
+
//on 'Esc', Focus is handled in 'handleEscapeKeydown'.
|
|
42
34
|
return false;
|
|
43
35
|
} else if (evt.code === 'Enter' && this.props.handleEnterKeydown) {
|
|
44
36
|
this.props.handleEnterKeydown(evt);
|
|
45
|
-
} else if (evt.code === 'Tab' && this.props.handleEscapeKeydown && this.props.
|
|
37
|
+
} else if (evt.code === 'Tab' && this.props.handleEscapeKeydown && this.props.closeOnTab) {
|
|
46
38
|
//The menus should be closed when the tab is pressed as it takes the focus out of the menu
|
|
47
39
|
this.props.handleEscapeKeydown(evt);
|
|
48
40
|
}
|
|
49
41
|
});
|
|
50
42
|
}
|
|
51
|
-
|
|
52
43
|
componentDidMount() {
|
|
53
44
|
if (this.props.handleClickOutside) {
|
|
54
45
|
document.addEventListener('click', this.handleClick, false);
|
|
55
46
|
}
|
|
56
|
-
|
|
57
47
|
if (this.props.handleEscapeKeydown) {
|
|
58
48
|
var _this$props$editorRef;
|
|
59
|
-
|
|
60
49
|
//Attached event to the menu so that 'ESC' events from the opened menu also will be handled.
|
|
61
50
|
(((_this$props$editorRef = this.props.editorRef) === null || _this$props$editorRef === void 0 ? void 0 : _this$props$editorRef.current) || this.props.targetRef || document).addEventListener('keydown', this.handleKeydown, false);
|
|
62
51
|
}
|
|
63
52
|
}
|
|
64
|
-
|
|
65
53
|
componentWillUnmount() {
|
|
66
54
|
if (this.props.handleClickOutside) {
|
|
67
55
|
document.removeEventListener('click', this.handleClick, false);
|
|
68
56
|
}
|
|
69
|
-
|
|
70
57
|
if (this.props.handleEscapeKeydown) {
|
|
71
58
|
var _this$props$editorRef2;
|
|
72
|
-
|
|
73
59
|
(((_this$props$editorRef2 = this.props.editorRef) === null || _this$props$editorRef2 === void 0 ? void 0 : _this$props$editorRef2.current) || this.props.targetRef || document).removeEventListener('keydown', this.handleKeydown, false);
|
|
74
60
|
}
|
|
75
61
|
}
|
|
76
|
-
|
|
77
62
|
render() {
|
|
78
63
|
return this.props.children;
|
|
79
64
|
}
|
|
80
|
-
|
|
81
65
|
}
|
|
82
|
-
|
|
83
66
|
function hasIsOpen(props) {
|
|
84
67
|
return 'isOpen' in props;
|
|
85
68
|
}
|
|
86
|
-
|
|
87
69
|
export default function withReactEditorViewOuterListeners(Component) {
|
|
88
70
|
return ({
|
|
89
71
|
handleClickOutside,
|
|
90
72
|
handleEnterKeydown,
|
|
91
73
|
handleEscapeKeydown,
|
|
92
|
-
|
|
74
|
+
closeOnTab,
|
|
93
75
|
...props
|
|
94
76
|
}) => {
|
|
95
77
|
const isActiveComponent = hasIsOpen(props) ? props.isOpen : true;
|
|
@@ -104,7 +86,7 @@ export default function withReactEditorViewOuterListeners(Component) {
|
|
|
104
86
|
handleClickOutside: handleClickOutside,
|
|
105
87
|
handleEnterKeydown: handleEnterKeydown,
|
|
106
88
|
handleEscapeKeydown: handleEscapeKeydown,
|
|
107
|
-
|
|
89
|
+
closeOnTab: closeOnTab
|
|
108
90
|
}, /*#__PURE__*/React.createElement(Component, props)));
|
|
109
91
|
};
|
|
110
92
|
}
|
|
@@ -3,16 +3,12 @@ export const getAnalyticsAppearance = appearance => {
|
|
|
3
3
|
switch (appearance) {
|
|
4
4
|
case 'full-page':
|
|
5
5
|
return EDITOR_APPEARANCE_CONTEXT.FIXED_WIDTH;
|
|
6
|
-
|
|
7
6
|
case 'full-width':
|
|
8
7
|
return EDITOR_APPEARANCE_CONTEXT.FULL_WIDTH;
|
|
9
|
-
|
|
10
8
|
case 'comment':
|
|
11
9
|
return EDITOR_APPEARANCE_CONTEXT.COMMENT;
|
|
12
|
-
|
|
13
10
|
case 'chromeless':
|
|
14
11
|
return EDITOR_APPEARANCE_CONTEXT.CHROMELESS;
|
|
15
|
-
|
|
16
12
|
case 'mobile':
|
|
17
13
|
return EDITOR_APPEARANCE_CONTEXT.MOBILE;
|
|
18
14
|
}
|
|
@@ -21,20 +17,16 @@ export const getAnalyticsEventSeverity = (duration, normalThreshold, degradedThr
|
|
|
21
17
|
if (duration > normalThreshold && duration <= degradedThreshold) {
|
|
22
18
|
return SEVERITY.DEGRADED;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
if (duration > degradedThreshold) {
|
|
26
21
|
return SEVERITY.BLOCKING;
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
return SEVERITY.NORMAL;
|
|
30
24
|
};
|
|
31
25
|
export let SEVERITY;
|
|
32
|
-
|
|
33
26
|
(function (SEVERITY) {
|
|
34
27
|
SEVERITY["NORMAL"] = "normal";
|
|
35
28
|
SEVERITY["DEGRADED"] = "degraded";
|
|
36
29
|
SEVERITY["BLOCKING"] = "blocking";
|
|
37
30
|
})(SEVERITY || (SEVERITY = {}));
|
|
38
|
-
|
|
39
31
|
export { UNSUPPORTED_CONTENT_LEVEL_SEVERITY, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS } from './unsupportedContent/get-unsupported-content-level-data';
|
|
40
32
|
export const analyticsEventKey = 'EDITOR_ANALYTICS_EVENT';
|
|
@@ -3,26 +3,23 @@ export const canApplyAnnotationOnRange = (rangeSelection, doc, schema) => {
|
|
|
3
3
|
from,
|
|
4
4
|
to
|
|
5
5
|
} = rangeSelection;
|
|
6
|
-
|
|
7
6
|
if (isNaN(from + to) || to - from <= 0 || to < 0 || from < 0) {
|
|
8
7
|
return false;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
let foundInvalid = false;
|
|
12
10
|
doc.nodesBetween(rangeSelection.from, rangeSelection.to, (node, _pos, parent) => {
|
|
13
11
|
// Special exception for hardBreak nodes
|
|
14
12
|
if (schema.nodes.hardBreak === node.type) {
|
|
15
13
|
return false;
|
|
16
|
-
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// For block elements or text nodes, we want to check
|
|
17
17
|
// if annotations are allowed inside this tree
|
|
18
18
|
// or if we're leaf and not text
|
|
19
|
-
|
|
20
|
-
|
|
21
19
|
if (node.isInline && !node.isText || node.isLeaf && !node.isText || node.isText && !parent.type.allowsMarkType(schema.marks.annotation)) {
|
|
22
20
|
foundInvalid = true;
|
|
23
21
|
return false;
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
return true;
|
|
27
24
|
});
|
|
28
25
|
return !foundInvalid;
|
|
@@ -37,7 +34,6 @@ export const getAnnotationIdsFromRange = (rangeSelection, doc, schema) => {
|
|
|
37
34
|
if (!node.marks) {
|
|
38
35
|
return true;
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
node.marks.forEach(mark => {
|
|
42
38
|
if (mark.type === schema.marks.annotation && mark.attrs) {
|
|
43
39
|
annotations.add(mark.attrs.id);
|