@atlaskit/editor-common 72.2.0 → 72.2.2
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 +12 -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 +0 -15
- 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 +14 -38
- package/dist/cjs/ui-menu/DropdownMenu/index.js +23 -75
- package/dist/cjs/ui-menu/MenuArrowKeyNavigationProvider/index.js +16 -49
- 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 +9 -49
- 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 +0 -15
- 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 +0 -7
- package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -21
- package/dist/es2019/ui-menu/MenuArrowKeyNavigationProvider/index.js +8 -31
- package/dist/es2019/ui-menu/ToolbarButton/index.js +2 -6
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +4 -22
- 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 +0 -15
- 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 +14 -27
- package/dist/esm/ui-menu/DropdownMenu/index.js +23 -56
- package/dist/esm/ui-menu/MenuArrowKeyNavigationProvider/index.js +16 -42
- package/dist/esm/ui-menu/ToolbarButton/index.js +23 -32
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +9 -38
- 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/package.json +4 -4
package/dist/es2019/version.json
CHANGED
|
@@ -7,7 +7,6 @@ import { analyticsEventKey, startMeasure, stopMeasure } from '../utils';
|
|
|
7
7
|
import { getParticipantsCount } from '../utils/collab';
|
|
8
8
|
const DEFAULT_SAMPLING_RATE = 100;
|
|
9
9
|
const DEFAULT_SLOW_THRESHOLD = 4;
|
|
10
|
-
|
|
11
10
|
/**
|
|
12
11
|
* Wraps component in a high order component that watches state changes of given plugins
|
|
13
12
|
* and passes those states to the wrapped component.
|
|
@@ -27,19 +26,12 @@ const DEFAULT_SLOW_THRESHOLD = 4;
|
|
|
27
26
|
class WithPluginState extends React.Component {
|
|
28
27
|
constructor(...args) {
|
|
29
28
|
super(...args);
|
|
30
|
-
|
|
31
29
|
_defineProperty(this, "listeners", {});
|
|
32
|
-
|
|
33
30
|
_defineProperty(this, "debounce", null);
|
|
34
|
-
|
|
35
31
|
_defineProperty(this, "notAppliedState", {});
|
|
36
|
-
|
|
37
32
|
_defineProperty(this, "isSubscribed", false);
|
|
38
|
-
|
|
39
33
|
_defineProperty(this, "callsCount", 0);
|
|
40
|
-
|
|
41
34
|
_defineProperty(this, "state", this.getPluginsStates(this.props.plugins, this.getEditorView(this.props, this.context)));
|
|
42
|
-
|
|
43
35
|
_defineProperty(this, "handlePluginStateChange", (propName, pluginName, performanceOptions, skipEqualityCheck) => pluginState => {
|
|
44
36
|
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
45
37
|
if (this.state[propName] !== pluginState || skipEqualityCheck) {
|
|
@@ -52,20 +44,18 @@ class WithPluginState extends React.Component {
|
|
|
52
44
|
});
|
|
53
45
|
}
|
|
54
46
|
});
|
|
55
|
-
|
|
56
47
|
_defineProperty(this, "updateState", ({
|
|
57
48
|
stateSubset,
|
|
58
49
|
pluginName,
|
|
59
50
|
performanceOptions
|
|
60
51
|
}) => {
|
|
61
|
-
this.notAppliedState = {
|
|
52
|
+
this.notAppliedState = {
|
|
53
|
+
...this.notAppliedState,
|
|
62
54
|
...stateSubset
|
|
63
55
|
};
|
|
64
|
-
|
|
65
56
|
if (this.debounce) {
|
|
66
57
|
window.clearTimeout(this.debounce);
|
|
67
58
|
}
|
|
68
|
-
|
|
69
59
|
const debounce = this.props.debounce !== false ? fn => window.setTimeout(fn, 0) : fn => fn();
|
|
70
60
|
this.debounce = debounce(() => {
|
|
71
61
|
const measure = `🦉${pluginName}::WithPluginState`;
|
|
@@ -92,10 +82,8 @@ class WithPluginState extends React.Component {
|
|
|
92
82
|
this.notAppliedState = {};
|
|
93
83
|
});
|
|
94
84
|
});
|
|
95
|
-
|
|
96
85
|
_defineProperty(this, "dispatchAnalyticsEvent", payload => {
|
|
97
86
|
const eventDispatcher = this.getEventDispatcher();
|
|
98
|
-
|
|
99
87
|
if (eventDispatcher) {
|
|
100
88
|
const dispatch = createDispatch(eventDispatcher);
|
|
101
89
|
dispatch(analyticsEventKey, {
|
|
@@ -103,55 +91,45 @@ class WithPluginState extends React.Component {
|
|
|
103
91
|
});
|
|
104
92
|
}
|
|
105
93
|
});
|
|
106
|
-
|
|
107
94
|
_defineProperty(this, "onContextUpdate", () => {
|
|
108
95
|
this.subscribe(this.props);
|
|
109
96
|
});
|
|
110
97
|
}
|
|
111
|
-
|
|
112
98
|
getEditorView(maybeProps, maybeContext) {
|
|
113
99
|
const props = maybeProps || this.props;
|
|
114
100
|
const context = maybeContext || this.context;
|
|
115
101
|
return props.editorView || context && context.editorActions && context.editorActions._privateGetEditorView() || context && context.editorSharedConfig && context.editorSharedConfig.editorView;
|
|
116
102
|
}
|
|
117
|
-
|
|
118
103
|
getEventDispatcher(maybeProps) {
|
|
119
104
|
const props = maybeProps || this.props;
|
|
120
105
|
return props.eventDispatcher || this.context && this.context.editorActions && this.context.editorActions._privateGetEventDispatcher() || this.context && this.context.editorSharedConfig && this.context.editorSharedConfig.eventDispatcher;
|
|
121
106
|
}
|
|
122
|
-
|
|
123
107
|
getPluginsStates(plugins, editorView) {
|
|
124
108
|
if (!editorView || !plugins) {
|
|
125
109
|
return {};
|
|
126
110
|
}
|
|
127
|
-
|
|
128
111
|
const keys = Object.keys(plugins);
|
|
129
112
|
return keys.reduce((acc, propName) => {
|
|
130
113
|
const pluginKey = plugins[propName];
|
|
131
|
-
|
|
132
114
|
if (!pluginKey) {
|
|
133
115
|
return acc;
|
|
134
116
|
}
|
|
135
|
-
|
|
136
117
|
acc[propName] = pluginKey.getState(editorView.state);
|
|
137
118
|
return acc;
|
|
138
119
|
}, {});
|
|
139
120
|
}
|
|
140
|
-
|
|
141
121
|
subscribe(props) {
|
|
142
122
|
var _uiTracking$samplingR, _uiTracking$slowThres;
|
|
143
|
-
|
|
144
123
|
const plugins = props.plugins;
|
|
145
124
|
const eventDispatcher = this.getEventDispatcher(props);
|
|
146
125
|
const editorView = this.getEditorView(props);
|
|
147
|
-
|
|
148
126
|
if (!eventDispatcher || !editorView || this.isSubscribed) {
|
|
149
127
|
return;
|
|
150
|
-
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// TODO: ED-15663
|
|
151
131
|
// Please, do not copy or use this kind of code below
|
|
152
132
|
// @ts-ignore
|
|
153
|
-
|
|
154
|
-
|
|
155
133
|
const fakePluginKey = {
|
|
156
134
|
key: 'analyticsPlugin$',
|
|
157
135
|
getState: state => {
|
|
@@ -168,11 +146,9 @@ class WithPluginState extends React.Component {
|
|
|
168
146
|
this.setState(pluginsStates);
|
|
169
147
|
Object.keys(plugins).forEach(propName => {
|
|
170
148
|
const pluginKey = plugins[propName];
|
|
171
|
-
|
|
172
149
|
if (!pluginKey) {
|
|
173
150
|
return;
|
|
174
151
|
}
|
|
175
|
-
|
|
176
152
|
const pluginName = pluginKey.key;
|
|
177
153
|
const pluginState = pluginsStates[propName];
|
|
178
154
|
const isPluginWithSubscribe = pluginState && pluginState.subscribe;
|
|
@@ -181,31 +157,25 @@ class WithPluginState extends React.Component {
|
|
|
181
157
|
slowThreshold,
|
|
182
158
|
trackingEnabled
|
|
183
159
|
}, isPluginWithSubscribe);
|
|
184
|
-
|
|
185
160
|
if (isPluginWithSubscribe) {
|
|
186
161
|
pluginState.subscribe(handler);
|
|
187
162
|
} else {
|
|
188
163
|
eventDispatcher.on(pluginKey.key, handler);
|
|
189
164
|
}
|
|
190
|
-
|
|
191
165
|
this.listeners[pluginKey.key] = {
|
|
192
166
|
handler,
|
|
193
167
|
pluginKey
|
|
194
168
|
};
|
|
195
169
|
});
|
|
196
170
|
}
|
|
197
|
-
|
|
198
171
|
unsubscribe() {
|
|
199
172
|
const eventDispatcher = this.getEventDispatcher();
|
|
200
173
|
const editorView = this.getEditorView();
|
|
201
|
-
|
|
202
174
|
if (!eventDispatcher || !editorView || !this.isSubscribed) {
|
|
203
175
|
return;
|
|
204
176
|
}
|
|
205
|
-
|
|
206
177
|
Object.keys(this.listeners).forEach(key => {
|
|
207
178
|
const pluginState = this.listeners[key].pluginKey.getState(editorView.state);
|
|
208
|
-
|
|
209
179
|
if (pluginState && pluginState.unsubscribe) {
|
|
210
180
|
pluginState.unsubscribe(this.listeners[key].handler);
|
|
211
181
|
} else {
|
|
@@ -214,53 +184,42 @@ class WithPluginState extends React.Component {
|
|
|
214
184
|
});
|
|
215
185
|
this.listeners = [];
|
|
216
186
|
}
|
|
217
|
-
|
|
218
187
|
subscribeToContextUpdates(context) {
|
|
219
188
|
if (context && context.editorActions) {
|
|
220
189
|
context.editorActions._privateSubscribe(this.onContextUpdate);
|
|
221
190
|
}
|
|
222
191
|
}
|
|
223
|
-
|
|
224
192
|
unsubscribeFromContextUpdates(context) {
|
|
225
193
|
if (context && context.editorActions) {
|
|
226
194
|
context.editorActions._privateUnsubscribe(this.onContextUpdate);
|
|
227
195
|
}
|
|
228
196
|
}
|
|
229
|
-
|
|
230
197
|
componentDidMount() {
|
|
231
198
|
this.subscribe(this.props);
|
|
232
199
|
this.subscribeToContextUpdates(this.context);
|
|
233
200
|
}
|
|
234
|
-
|
|
235
201
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
236
202
|
if (!this.isSubscribed) {
|
|
237
203
|
this.subscribe(nextProps);
|
|
238
204
|
}
|
|
239
205
|
}
|
|
240
|
-
|
|
241
206
|
componentWillUnmount() {
|
|
242
207
|
if (this.debounce) {
|
|
243
208
|
window.clearTimeout(this.debounce);
|
|
244
209
|
}
|
|
245
|
-
|
|
246
210
|
this.unsubscribeFromContextUpdates(this.context);
|
|
247
211
|
this.unsubscribe();
|
|
248
212
|
}
|
|
249
|
-
|
|
250
213
|
render() {
|
|
251
214
|
const {
|
|
252
215
|
render
|
|
253
216
|
} = this.props;
|
|
254
217
|
return render(this.state);
|
|
255
218
|
}
|
|
256
|
-
|
|
257
219
|
}
|
|
258
|
-
|
|
259
220
|
_defineProperty(WithPluginState, "displayName", 'WithPluginState');
|
|
260
|
-
|
|
261
221
|
_defineProperty(WithPluginState, "contextTypes", {
|
|
262
222
|
editorActions: PropTypes.object,
|
|
263
223
|
editorSharedConfig: PropTypes.object
|
|
264
224
|
});
|
|
265
|
-
|
|
266
225
|
export { WithPluginState };
|
|
@@ -7,15 +7,12 @@ export var editorTypingTestCase = function editorTypingTestCase(opts) {
|
|
|
7
7
|
id: 'editor-typing',
|
|
8
8
|
assertions: function assertions(cy) {
|
|
9
9
|
var _opts$ui;
|
|
10
|
-
|
|
11
10
|
var editor = new EditorPageObject(cy);
|
|
12
11
|
editor.getEditorArea().type('abcdef');
|
|
13
12
|
editor.getEditorArea().contains('abcdef');
|
|
14
|
-
|
|
15
13
|
if (!opts || !((_opts$ui = opts.ui) !== null && _opts$ui !== void 0 && _opts$ui.publishButton)) {
|
|
16
14
|
return;
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
var publishButton = opts.ui.publishButton;
|
|
20
17
|
var renderer = new RendererPageObject(cy);
|
|
21
18
|
cy.get(publishButton).click();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var deleteBlockSmartLinkTestCase = function deleteBlockSmartLinkTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'able to delete a Block Smart Link using floating toolbar',
|
|
10
10
|
id: 'delete-block-smart-link',
|
|
@@ -19,7 +19,6 @@ export var deleteBlockSmartLinkTestCase = function deleteBlockSmartLinkTestCase(
|
|
|
19
19
|
}).assertions(cy);
|
|
20
20
|
editorWithSmartLinks.deleteSmartLink('block');
|
|
21
21
|
blockCard.expectCardNotExists();
|
|
22
|
-
|
|
23
22
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
24
23
|
var renderer = editor.publish(ui);
|
|
25
24
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var editBlockSmartLinkTitleTestCase = function editBlockSmartLinkTitleTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'editing a Block Smart Link renders as Blue Link (title)',
|
|
10
10
|
id: 'block-smart-link-edit-title',
|
|
@@ -20,7 +20,6 @@ export var editBlockSmartLinkTitleTestCase = function editBlockSmartLinkTitleTes
|
|
|
20
20
|
editorWithSmartLinks.changeLinkLabel('Avocorne is watching you 🥑', 'block');
|
|
21
21
|
blockCard.assertHrefRendered(url);
|
|
22
22
|
blockCard.expectCardNotExists();
|
|
23
|
-
|
|
24
23
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
25
24
|
var renderer = editor.publish(ui);
|
|
26
25
|
renderer.expectContentReady();
|
|
@@ -32,7 +31,7 @@ export var editBlockSmartLinkTitleTestCase = function editBlockSmartLinkTitleTes
|
|
|
32
31
|
};
|
|
33
32
|
export var editBlockSmartLinkUrlTestCase = function editBlockSmartLinkUrlTestCase(_ref2) {
|
|
34
33
|
var ui = _ref2.ui,
|
|
35
|
-
|
|
34
|
+
url = _ref2.url;
|
|
36
35
|
return new InProductTestCase({
|
|
37
36
|
title: 'editing a Block Smart Link renders as Blue Link (URL)',
|
|
38
37
|
id: 'block-smart-link-edit',
|
|
@@ -49,7 +48,6 @@ export var editBlockSmartLinkUrlTestCase = function editBlockSmartLinkUrlTestCas
|
|
|
49
48
|
editorWithSmartLinks.changeLinkUrl(newUrl, 'block');
|
|
50
49
|
blockCard.expectCardNotExists();
|
|
51
50
|
blockCard.assertHrefRendered(newUrl);
|
|
52
|
-
|
|
53
51
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
54
52
|
var renderer = editor.publish(ui);
|
|
55
53
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var switchToBlockSmartLinkTestCase = function switchToBlockSmartLinkTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'switching to a Block Smart Link works',
|
|
10
10
|
id: 'switch-to-block',
|
|
@@ -16,7 +16,6 @@ export var switchToBlockSmartLinkTestCase = function switchToBlockSmartLinkTestC
|
|
|
16
16
|
blockSmartLinkRendersTestCase({
|
|
17
17
|
url: url
|
|
18
18
|
}).assertions(cy);
|
|
19
|
-
|
|
20
19
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
21
20
|
var renderer = editor.publish(ui);
|
|
22
21
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var deleteEmbedSmartLinkTestCase = function deleteEmbedSmartLinkTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'able to delete an Embed Smart Link using floating toolbar',
|
|
10
10
|
id: 'delete-embed-smart-link',
|
|
@@ -19,7 +19,6 @@ export var deleteEmbedSmartLinkTestCase = function deleteEmbedSmartLinkTestCase(
|
|
|
19
19
|
}).assertions(cy);
|
|
20
20
|
editorWithSmartLinks.deleteSmartLink('embed');
|
|
21
21
|
embedCard.expectCardNotExists();
|
|
22
|
-
|
|
23
22
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
24
23
|
var renderer = editor.publish(ui);
|
|
25
24
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var editEmbedSmartLinkTitleTestCase = function editEmbedSmartLinkTitleTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'editing an Embed Smart Link renders as Blue Link (title)',
|
|
10
10
|
id: 'embed-smart-link-edit-title',
|
|
@@ -20,7 +20,6 @@ export var editEmbedSmartLinkTitleTestCase = function editEmbedSmartLinkTitleTes
|
|
|
20
20
|
editorWithSmartLinks.changeLinkLabel('Avocorne is watching you 🥑', 'embed');
|
|
21
21
|
embedCard.assertHrefRendered(url);
|
|
22
22
|
embedCard.expectCardNotExists();
|
|
23
|
-
|
|
24
23
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
25
24
|
var renderer = editor.publish(ui);
|
|
26
25
|
renderer.expectContentReady();
|
|
@@ -32,7 +31,7 @@ export var editEmbedSmartLinkTitleTestCase = function editEmbedSmartLinkTitleTes
|
|
|
32
31
|
};
|
|
33
32
|
export var editEmbedSmartLinkUrlTestCase = function editEmbedSmartLinkUrlTestCase(_ref2) {
|
|
34
33
|
var ui = _ref2.ui,
|
|
35
|
-
|
|
34
|
+
url = _ref2.url;
|
|
36
35
|
return new InProductTestCase({
|
|
37
36
|
title: 'editing an Embed Smart Link renders as Blue Link (URL)',
|
|
38
37
|
id: 'embed-smart-link-edit',
|
|
@@ -49,7 +48,6 @@ export var editEmbedSmartLinkUrlTestCase = function editEmbedSmartLinkUrlTestCas
|
|
|
49
48
|
editorWithSmartLinks.changeLinkUrl(newUrl, 'embed');
|
|
50
49
|
embedCard.expectCardNotExists();
|
|
51
50
|
embedCard.assertHrefRendered(newUrl);
|
|
52
|
-
|
|
53
51
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
54
52
|
var renderer = editor.publish(ui);
|
|
55
53
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var switchToEmbedSmartLinkTestCase = function switchToEmbedSmartLinkTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'switching to an Embed Smart Link works',
|
|
10
10
|
id: 'switch-to-embed',
|
|
@@ -16,7 +16,6 @@ export var switchToEmbedSmartLinkTestCase = function switchToEmbedSmartLinkTestC
|
|
|
16
16
|
embedSmartLinkRendersTestCase({
|
|
17
17
|
url: url
|
|
18
18
|
}).assertions(cy);
|
|
19
|
-
|
|
20
19
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
21
20
|
var renderer = editor.publish(ui);
|
|
22
21
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var deleteInlineSmartLinkTestCase = function deleteInlineSmartLinkTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'able to delete an Inline Smart Link using floating toolbar',
|
|
10
10
|
id: 'delete-inline-smart-link',
|
|
@@ -18,7 +18,6 @@ export var deleteInlineSmartLinkTestCase = function deleteInlineSmartLinkTestCas
|
|
|
18
18
|
}).assertions(cy);
|
|
19
19
|
editorWithSmartLinks.deleteSmartLink();
|
|
20
20
|
inlineCard.expectCardNotExists();
|
|
21
|
-
|
|
22
21
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
23
22
|
var renderer = editor.publish(ui);
|
|
24
23
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var editInlineSmartLinkTitleTestCase = function editInlineSmartLinkTitleTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'editing an Inline Smart Link renders as Blue Link (title)',
|
|
10
10
|
id: 'inline-smart-link-edit-title',
|
|
@@ -19,7 +19,6 @@ export var editInlineSmartLinkTitleTestCase = function editInlineSmartLinkTitleT
|
|
|
19
19
|
editorWithSmartLinks.changeLinkLabel('Avocorne is watching you 🥑');
|
|
20
20
|
inlineCard.assertHrefRendered(url);
|
|
21
21
|
inlineCard.expectCardNotExists();
|
|
22
|
-
|
|
23
22
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
24
23
|
var renderer = editor.publish(ui);
|
|
25
24
|
renderer.expectContentReady();
|
|
@@ -31,7 +30,7 @@ export var editInlineSmartLinkTitleTestCase = function editInlineSmartLinkTitleT
|
|
|
31
30
|
};
|
|
32
31
|
export var editInlineSmartLinkUrlTestCase = function editInlineSmartLinkUrlTestCase(_ref2) {
|
|
33
32
|
var ui = _ref2.ui,
|
|
34
|
-
|
|
33
|
+
url = _ref2.url;
|
|
35
34
|
return new InProductTestCase({
|
|
36
35
|
title: 'editing an Inline Smart Link renders as Blue Link (URL)',
|
|
37
36
|
id: 'inline-smart-link-edit',
|
|
@@ -47,7 +46,6 @@ export var editInlineSmartLinkUrlTestCase = function editInlineSmartLinkUrlTestC
|
|
|
47
46
|
editorWithSmartLinks.changeLinkUrl(newUrl);
|
|
48
47
|
inlineCard.expectCardNotExists();
|
|
49
48
|
inlineCard.assertHrefRendered(newUrl);
|
|
50
|
-
|
|
51
49
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
52
50
|
var renderer = editor.publish(ui);
|
|
53
51
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var insertInlineSmartLinkTestCase = function insertInlineSmartLinkTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'inserting an Inline Smart Link works',
|
|
10
10
|
id: 'inline-smart-link-insert',
|
|
@@ -15,7 +15,6 @@ export var insertInlineSmartLinkTestCase = function insertInlineSmartLinkTestCas
|
|
|
15
15
|
inlineSmartLinkRendersTestCase({
|
|
16
16
|
url: url
|
|
17
17
|
}).assertions(cy);
|
|
18
|
-
|
|
19
18
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
20
19
|
var renderer = editor.publish(ui);
|
|
21
20
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var unlinkInlineSmartLinkTestCase = function unlinkInlineSmartLinkTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'unlinking an Inline Smart Link works',
|
|
10
10
|
id: 'inline-smart-link-unlink',
|
|
@@ -19,7 +19,6 @@ export var unlinkInlineSmartLinkTestCase = function unlinkInlineSmartLinkTestCas
|
|
|
19
19
|
editorWithSmartLinks.unlink();
|
|
20
20
|
inlineCard.expectCardNotExists();
|
|
21
21
|
inlineCard.assertHrefNotRendered(url);
|
|
22
|
-
|
|
23
22
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
24
23
|
var renderer = editor.publish(ui);
|
|
25
24
|
renderer.expectContentReady();
|
|
@@ -4,7 +4,7 @@ import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
|
4
4
|
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
5
|
export var switchToUrlTestCase = function switchToUrlTestCase(_ref) {
|
|
6
6
|
var ui = _ref.ui,
|
|
7
|
-
|
|
7
|
+
url = _ref.url;
|
|
8
8
|
return new InProductTestCase({
|
|
9
9
|
title: 'switching to a Blue Link works',
|
|
10
10
|
id: 'switch-to-url',
|
|
@@ -15,7 +15,6 @@ export var switchToUrlTestCase = function switchToUrlTestCase(_ref) {
|
|
|
15
15
|
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
16
16
|
editorWithSmartLinks.switchAfterInsert('url');
|
|
17
17
|
inlineCard.assertHrefRendered(url);
|
|
18
|
-
|
|
19
18
|
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
20
19
|
var renderer = editor.publish(ui);
|
|
21
20
|
renderer.expectContentReady();
|
|
@@ -3,24 +3,17 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
7
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
-
|
|
9
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
|
|
11
8
|
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
12
9
|
import { RendererPageObject } from './Renderer';
|
|
13
10
|
export var EditorPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
14
11
|
_inherits(EditorPageObject, _InProductTestPageObj);
|
|
15
|
-
|
|
16
12
|
var _super = _createSuper(EditorPageObject);
|
|
17
|
-
|
|
18
13
|
function EditorPageObject() {
|
|
19
14
|
_classCallCheck(this, EditorPageObject);
|
|
20
|
-
|
|
21
15
|
return _super.apply(this, arguments);
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
_createClass(EditorPageObject, [{
|
|
25
18
|
key: "getEditorArea",
|
|
26
19
|
value: function getEditorArea() {
|
|
@@ -40,10 +33,8 @@ export var EditorPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
|
40
33
|
this.cy.get(opts.publishButton).click();
|
|
41
34
|
return new RendererPageObject(this.cy);
|
|
42
35
|
}
|
|
43
|
-
|
|
44
36
|
throw Error('No publish button selector supplied!');
|
|
45
37
|
}
|
|
46
38
|
}]);
|
|
47
|
-
|
|
48
39
|
return EditorPageObject;
|
|
49
40
|
}(InProductTestPageObject);
|
|
@@ -5,25 +5,17 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
|
|
9
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
|
|
11
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
|
|
13
10
|
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
14
11
|
import { BlockCardPageObject, EmbedCardPageObject, InlineCardPageObject } from '@atlaskit/smart-card/in-product';
|
|
15
12
|
export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
16
13
|
_inherits(EditorSmartLinkPageObject, _InProductTestPageObj);
|
|
17
|
-
|
|
18
14
|
var _super = _createSuper(EditorSmartLinkPageObject);
|
|
19
|
-
|
|
20
15
|
function EditorSmartLinkPageObject(cy, editor) {
|
|
21
16
|
var _this;
|
|
22
|
-
|
|
23
17
|
_classCallCheck(this, EditorSmartLinkPageObject);
|
|
24
|
-
|
|
25
18
|
_this = _super.call(this, cy);
|
|
26
|
-
|
|
27
19
|
_defineProperty(_assertThisInitialized(_this), "testIds", {
|
|
28
20
|
viewSwitcher: 'link-toolbar-appearance-button',
|
|
29
21
|
displayUrlOption: 'url-appearance',
|
|
@@ -33,18 +25,15 @@ export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPage
|
|
|
33
25
|
linkUrl: 'link-url',
|
|
34
26
|
linkLabel: 'link-label'
|
|
35
27
|
});
|
|
36
|
-
|
|
37
28
|
_defineProperty(_assertThisInitialized(_this), "ariaLabels", {
|
|
38
29
|
editLink: 'Edit link',
|
|
39
30
|
deleteLink: 'Remove',
|
|
40
31
|
unlinkLink: 'Unlink'
|
|
41
32
|
});
|
|
42
|
-
|
|
43
33
|
_this.cy = cy;
|
|
44
34
|
_this.editor = editor;
|
|
45
35
|
return _this;
|
|
46
36
|
}
|
|
47
|
-
|
|
48
37
|
_createClass(EditorSmartLinkPageObject, [{
|
|
49
38
|
key: "getViewSwitcher",
|
|
50
39
|
value: function getViewSwitcher() {
|
|
@@ -59,28 +48,23 @@ export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPage
|
|
|
59
48
|
key: "getViewSwitcherOption",
|
|
60
49
|
value: function getViewSwitcherOption() {
|
|
61
50
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
62
|
-
|
|
63
51
|
switch (type) {
|
|
64
52
|
case 'url':
|
|
65
53
|
{
|
|
66
54
|
return this.cy.get(this.toTestId(this.testIds.displayUrlOption));
|
|
67
55
|
}
|
|
68
|
-
|
|
69
56
|
case 'inline':
|
|
70
57
|
{
|
|
71
58
|
return this.cy.get(this.toTestId(this.testIds.displayInlineOption));
|
|
72
59
|
}
|
|
73
|
-
|
|
74
60
|
case 'block':
|
|
75
61
|
{
|
|
76
62
|
return this.cy.get(this.toTestId(this.testIds.displayCardOption));
|
|
77
63
|
}
|
|
78
|
-
|
|
79
64
|
case 'embed':
|
|
80
65
|
{
|
|
81
66
|
return this.cy.get(this.toTestId(this.testIds.displayEmbedOption));
|
|
82
67
|
}
|
|
83
|
-
|
|
84
68
|
default:
|
|
85
69
|
{
|
|
86
70
|
throw Error("Attempted to switch to `".concat(type, "`: unknown Smart Link view switcher option!"));
|
|
@@ -98,12 +82,10 @@ export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPage
|
|
|
98
82
|
key: "insertSmartLinkByTyping",
|
|
99
83
|
value: function insertSmartLinkByTyping(url) {
|
|
100
84
|
var _this2 = this;
|
|
101
|
-
|
|
102
85
|
return this.editor.getEditorArea().type("".concat(url, " "), {
|
|
103
86
|
delay: 0
|
|
104
87
|
}).get('p>a').type('{leftArrow}{leftArrow}').get('[aria-label="Floating Toolbar"]').then(function () {
|
|
105
88
|
_this2.openViewSwitcher();
|
|
106
|
-
|
|
107
89
|
_this2.selectViewSwitcherOption('inline');
|
|
108
90
|
});
|
|
109
91
|
}
|
|
@@ -121,23 +103,19 @@ export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPage
|
|
|
121
103
|
key: "getSmartLink",
|
|
122
104
|
value: function getSmartLink() {
|
|
123
105
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
124
|
-
|
|
125
106
|
switch (type) {
|
|
126
107
|
case 'inline':
|
|
127
108
|
{
|
|
128
109
|
return new InlineCardPageObject(this.cy);
|
|
129
110
|
}
|
|
130
|
-
|
|
131
111
|
case 'block':
|
|
132
112
|
{
|
|
133
113
|
return new BlockCardPageObject(this.cy);
|
|
134
114
|
}
|
|
135
|
-
|
|
136
115
|
case 'embed':
|
|
137
116
|
{
|
|
138
117
|
return new EmbedCardPageObject(this.cy);
|
|
139
118
|
}
|
|
140
|
-
|
|
141
119
|
case 'url':
|
|
142
120
|
{
|
|
143
121
|
return new InlineCardPageObject(this.cy);
|
|
@@ -219,6 +197,5 @@ export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPage
|
|
|
219
197
|
return this.cy.get(unlinkButtonSelector).click();
|
|
220
198
|
}
|
|
221
199
|
}]);
|
|
222
|
-
|
|
223
200
|
return EditorSmartLinkPageObject;
|
|
224
201
|
}(InProductTestPageObject);
|
|
@@ -3,23 +3,16 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
7
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
-
|
|
9
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
|
|
11
8
|
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
12
9
|
export var RendererPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
13
10
|
_inherits(RendererPageObject, _InProductTestPageObj);
|
|
14
|
-
|
|
15
11
|
var _super = _createSuper(RendererPageObject);
|
|
16
|
-
|
|
17
12
|
function RendererPageObject() {
|
|
18
13
|
_classCallCheck(this, RendererPageObject);
|
|
19
|
-
|
|
20
14
|
return _super.apply(this, arguments);
|
|
21
15
|
}
|
|
22
|
-
|
|
23
16
|
_createClass(RendererPageObject, [{
|
|
24
17
|
key: "getContent",
|
|
25
18
|
value: function getContent() {
|
|
@@ -31,6 +24,5 @@ export var RendererPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
|
31
24
|
return this.cy.get('.ak-renderer-document').should('be.visible');
|
|
32
25
|
}
|
|
33
26
|
}]);
|
|
34
|
-
|
|
35
27
|
return RendererPageObject;
|
|
36
28
|
}(InProductTestPageObject);
|